SlideShare a Scribd company logo
1 of 50
Objectives:
• Image file representation
• Image file calculation
Image Representation
• Each box represent one pixel
• 8 X 8 bit map image
• Image size is 64
• Bitmap image -
• JPEG
• GIF ect…
Bitmap graphics: A bitmap file stores the position and color of every
pixel that makes up an image. The image is made of millions of pixels
and the color of each pixel is stored using a number code. A bitmap is a
good way to store photographs.
Vector graphics: A vector image is made up of shapes constructed from
lines. The computer stores mathematical formulas that tell it how to draw
shapes and lines. A vector file is smaller than a bitmap file. Vector
graphics are good for images made of simple lines and shapes, for
example, cartoons, diagrams, and graphs.
Images in digital form
• If a bitmap image is made larger, all the dots get
bigger and the image looks distorted. This is called
pixelation.
• Pixelation does not affect vector images, they are
drawn to the correct size using the stored
mathematical formulas
Pixelation
• Bitmap images are made up of a two-
dimension matrix of pixels.
• Each pixel is represented by a binary number.
• The bitmap image is stored as a series of
binary numbers
• A black and white image needs only one bit per
pixel (0 or 1)
• If each pixel is represented by 2 bits, then the
pixel can be one of these four colors. (22 = 4), 00,
01, 10, 11
Bitmap Images
Colour depth: The number of bits used to represent
each color is called bit depth
If 8-bit color depth means that each pixel can be one
of 256 colors ( 28 = 256)
Image resolution: Number of pixels that make up an
image.
• An increase in the image will increase the file size
Bitmap Images
Representation of Sound
• Each sound file has a wavelength, frequency,
and amplitude.
• Sound is analog, so sound waves need to be
sampled to be stored in the computer.
• Sampling means measuring the amplitude
of the sound wave. This is done by ADC.
• To convert analog data to digital, the sound
waves are sampled at regular time intervals.
Fundamentals of Sound
Sound Wave
• Sound is about vibration. Any sound requires a source, such as a
human voice or musical instrument, and a substance to travel
through
• These vibrations consist of the motion of particles back and forth,
knocking with each other and creating a sound wave: an
analogue signal that travels in the air.
Fundamentals of Sound
Amplitude or volume
• The amplitude is the intensity (or height) of the sound wave. It
relates to the amount of energy the wave carries and it is
measured in voltage (V).
• If calculated from the crest, it will have a positive peak of energy,
for example 10V
• If calculated from the trough, it will have a negative peak of
energy, for example -10V
Fundamentals of Sound
Time period (Duration)
A wave has a repeated pattern, and one completed repetition is
called a cycle (or frequency).
Time period is the time necessary to complete a cycle. A complete
cycle occurs when the sound wave passes between two consecutive
points. This can be:
• Two consecutive crests
• Two consecutive troughs
The formula for calculating the time to complete a cycle is:
Time period = 1 / frequency
Fundamentals of Sound
Frequency
• The frequency is the number of completed cycles per second of a
sound wave.
• To calculate the frequency of a sound wave, you need to calculate
the time it takes to complete one wave cycle. The unit used to
measure frequency is named hertz (Hz). One hertz is one cycle per
second.
•
• For example, a frequency of 1 hertz means that the wave has one
cycle per second.
Frequency
High-frequency waves appear close together and low-frequency waves appear
further apart.
Sampling sound
A technique used to convert a sound from analogue to digital is sampling.
While sampling a sound, the computer takes measurements of the analogue
signal at regular time intervals, and then a unique bit pattern of binary numbers is
assigned to each sample. After that, the digitised sound can be stored and
processed by a computer as a sequence of 1,1s and 0,0s.
Representation of Sound
Representation of Sound
Sample resolution: The number of bits per sample
is known as sample resolution (bit depth)
Sampling Rate (frequency): The number of
sound samples taken per second. This is measured
in hertz (Hz).
1 Hz = 1 sample per second
CDs have a 16-bit sampling resolution and a 4.1
kHz sample rate, that is 44100 Hz samples every
second. This gives high-quality sound.
Representation of Sound
Benefits and drawbacks of using large sampling
resolution when recording the sound
Image Calculation
File size = horizontal pixels × vertical pixels × bit depth
-------------------------------------------
8(to convert to bytes) × 1024 (kilobytes)
Bit Depth (Bits Per Pixel) Number of Colours or Tones Where do # of Colours Come
From?
1 2 21=2
2 4 22=4
3 8 23=8
4 16 24=16
6 64 26=64
8 256 28=256
Image File Calculation
A 500dpi image that measures 7 inches by 6 inches with the availability of
65,536 colours would result in the following calculation:
Exam Style Questions
How many bits per pixel would need to be
used if an image used 4 colours instead of 2?
2 bits
2 power 2 = 4
Exam Style Questions
The image below contain a black and white image consisting of 36 pixels.
Explain why 36 bits are needed to represent the pixels in the image .
Two colours needed in the image so two
possible bit pattens needed 36 pixeles so
36 bits needed
Exam Style Questions
A bitmapped image with a colour depth of
one can represent images that use two
colours.
How many more colours can be represeted
in an image if the colour depth is increased
from one to four?
14
16- 2 = 14
Exam Style Questions
State the minimum number of bits needed to
encode 32 different colours?
5 bits
Audio file Calculation
• Sample rate in Hz
• bit depth/ Bit Resolution
• Length
• Number of channels (mono /Stereo)
Sample rate Bit Resolution
11.025kHz 8 Bit
22.05. kHz 8 bit
44.1 kHz 16 bit
Sample rate X Bit Resolution X Time (seconds) X Channel
Audio file Size = ________________________________________________
8(to convert to bytes) × 1024 (kilobytes)
Audio File calculation
Bit Rate: Every second how many bits are taken in that audio. Bit rates are
usually measured in kilobits per second (kbps).
Bit rate = sample rate X bit resolution X Channels
----------------------------------------------------
1000
Audio File calculation
What if the audio is 1 Minute, with a 16 bit resolution and
44.1kHz with the stereo channel. What would be the file size?
Size =( 44.1 X 1000 X 16 X 60 X 2) / ( 8 X 1024 X 1024)
= 10.09 MB
Bit rate = 44100 X 16 X 2
------------------- = 1411.2 kbps
1000
Audio File calculation
Five minutes of music is sampled at 40000 samples per second, and
each sample is encoded into 16 bits(2 bytes). How big will the
resulting music file be?
5 minutes =300 seconds. So there are 300 X 40,000.
Each sample occupies 2 bytes, making a file size of
= 300 X 40000 X 2 bytes
= 24,000000 bytes
= 24 MB
Audio File calculation
Five minutes of music is sampled at 8000 samples per second,
and each sample is encoded into 16 bits(2 bytes). How big will
the resulting music file be?
File Compression
Lossless Compression
Breaking up the files into “smaller” form for
transmission or storage and then putting it back
together .
Example:
• Text Files
• ZIP files format
• UNIX tool GZIP G
• GIF
Lossy Compression
These programs simply eliminate "unnecessary" bits of
information, tailoring the file so that it is smaller. This type of
compression is used a lot for reducing the file size of bitmap
pictures, which tend to be fairly bulky.
Example:
• JPEG
• MP4
• MP3
An image is 3072 pixels by 2304. Calculate:
• The total number of pixels in the original image
• The number if bytes occupied by this file
• The file size of the jpeg image ( in MB) if the original image
was reduced by a factor of 5
• How many uncompressed file of the size calculated in
above could be stored on a 4 gigabyte memory card.
• How many compressed files of the size calculated above
could be store in 4 gigabyte memory card
Activity -1
Storage
size
Document / Spread
sheet
Database ( MS ACCESS)
1 Byte Single character in text
Whole number 0 to 255
Text data type
Whole number (-128 to +127) ---Number /
BYTE data type
Yes/ NO data type
2 byte A single character for a
large Asian character set
The whole number (-3200 to +3200) -----
Number/ Integer / Short data type
4 Byte Whole number between - 2
billion to +2 billion
Single precision/ Floating
point
Number/ Long Integer type
Number / Single data type (6 decimal digits)
8 bytes Double precisions Floating
Point (15 digits)
Massive whole numbers
Number / Double Data type
Date/Time Data type
Currency Data type
TEXT / Database file Size Calculations
Standard data types size:
Usually text files uses ASCII format. It code the text files in denary or
hexadecimal. (RLE – Run Length Encoding)
The phrase
“ THIS SECTION SHOWS YOU HOW THIS WORLD” 35
“1 SECTION S2S Y3 2 1 W3LD WORK” 23 mem ory units
Text File Compression
 Repeated word THIS is replaced as number 1
 HOW and OU is replaced as number 2 and 3
 Spaces are ignored and 33% of file size saved
 Text files uses the Lossless file compression.
Image File Compression – RLE
https://www.csfieldguide.org.nz/en/interactives/run-length-encoding/
https://www.dcode.fr/rle-compression#f1
RLE Calculator
Estimate the file size of the word document which contains 2000
characters and a small image which is 300 X 300 pixels in size with 8
colors. Assume an extra 20 KB for other document features.[4]
Characters = 2000 bytes
Image size = 300 X 300 X 3 = 270000 bits = 33750 bytes
Extra = 20 KB = 20480 bytes
Exercise - 1
File size = 2000 +33750 + 20480 = 56230 bytes = 54.9 KB
Or
= 2000 + 33750 + 20000 = 55750 / 1000 = 55. 7 KB
A database is to contain a person’s name and their address.
Decide the maximum number of characters you would need to input a
name and an address.
Estimate the maximum size of files needed to store the name and address.
Exercise - 2
A security system contain a password (16 characters long), a username(20
characters long), a small photo(256 X 640 pixels in size) and a security
questions ( up to 72 characters long). Estimate the file size needed to store
all this data
Exercise - 3
MIDI - Musical Instrument Digital Interface
MIDI files are not music and don’t contain any sounds
MIDI represents the information needed to recreate
a performance as many individual pieces of data.
MIDI is a communications protocol that allows
electronic sounds to interact with each other
MIDI Devices Devices that can be controlled with MIDI
include:
Keyboards
Synths
Effects units
MIDI Interface/Control Devices
Lighting Boards
Mixers
Computer Programs – computers
Fireworks
MIDI - Musical Instrument Digital Interface
MIDI - Musical Instrument Digital Interface
 MIDI Cable – 5 pin DIN
connectors
 MIDI Interface – Multiple inputs and outputs
which can digitally route MIDI Messages on
the fly, much like a patch bay.
 This is a typical
MIDI/Computer
setup.
 Additional devices can either be routed by the interface or
connected to the MIDI THRU of the preceding device.
 Devices can be directly routed to one another without the
need of a computer or interface
MIDI Setups
MIDI commands
• The fist byte is the status byte – Informs the MIDI device
what function to perform.
• MIDI has 16 channels( 0 to 15)
• Pitch Byte – tells which byte to play)
• Velocity Byte – tells how loud to play notes
• Note on/off - tells that a key has been pressed/released
• Key pressure - tells how loudness of the music note
Sequencer Software is needed to play back
the MIDI files in any instrument.
MIDI files may be converted to MP3, WAV,
WMA, FLAC, OGG, AAC, MPC on any
Windows platform using Total Audio
Converter
MIDI
Upload
Uploading means data is being sent from
your computer to the internet
Example :
• Sending Email
• Positng photos on social
media
• Using webcam
Download
Downloading means data your computer is
receiving data from the Internet the internet
Example :
• opening webpage
• Receiving email
• Purchasing any files
• Watching online videos
A company which offers the following Internet broadband
transfer rates:
• 56 megabits per second DOWNLOAD
• 16 megabits per second UPLOAD
If each music track is 3.5 megabytes in size, how long
would it take Juan to download his 40 tracks?
40 tracks = 40 X 3.5 = 140 MB
56 megabits/sec = 7 Mbyte/sec
Time take to download the tracks = 140/7
= 20 Seconds
Dima has agreed to send Michaela a 20 megabyte file. They both have a broadband
connection. Dima has to upload his file to a server and then Michaela needs to
download it from the same server. The broadband data transfer rates (speeds) are:
1 megabits per second to upload a file
8 megabits per second to download a file
(Note: 8 bits = 1 byte)
a. How long does it take to upload Dima’s file?
b. How long does it take to download Dima’s file?
A company advertises its Internet broadband speeds as follows:
• download speed of 128 megabits per second
• upload speed of 16 megabits per second (8 bits = 1 byte)
a) Explain what is meant by the two terms download speed and
upload speed
(b) How many 4-megabyte files could be downloaded per second
using this company’s broadband
David has a photo that is 2MB. How many of these can he store
on his 3GB memory stick?
3 * 1000 = 3000
3000 / 2 = 1500
Number the data storage units from 1 (smallest) to 9 (largest).
The first one has been done for you.

More Related Content

Similar to Unit1_File Size Calculation.pptx

Digital Transmission Fundamentals
Digital Transmission FundamentalsDigital Transmission Fundamentals
Digital Transmission FundamentalsAisu
 
Multimedia
MultimediaMultimedia
MultimediaMR Z
 
Digital Image Processing and gis software systems
Digital Image Processing and gis software systemsDigital Image Processing and gis software systems
Digital Image Processing and gis software systemsNirmal Kumar
 
Digital Electronics for Audio
Digital Electronics for AudioDigital Electronics for Audio
Digital Electronics for Audiojazztothebone
 
fundamentals of digital imaging - POONAM.pptx
fundamentals of digital imaging - POONAM.pptxfundamentals of digital imaging - POONAM.pptx
fundamentals of digital imaging - POONAM.pptxPoonamRijal
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesDIPIKA83
 
Audio encoding principles
Audio encoding principlesAudio encoding principles
Audio encoding principlesPhillip Doyle
 
Tools for Information Processes: Organising
Tools for Information Processes: OrganisingTools for Information Processes: Organising
Tools for Information Processes: OrganisingKelly Bauer
 
Chapter 02 audio recording - part i
Chapter 02   audio recording - part iChapter 02   audio recording - part i
Chapter 02 audio recording - part iNazihah Ahwan
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptxkiarambelele
 
Data Representation in Computers
Data Representation in ComputersData Representation in Computers
Data Representation in ComputersSajitha Pathirana
 
Analog to digital conversion
Analog to digital conversionAnalog to digital conversion
Analog to digital conversionDJShirlee
 
Week 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyWeek 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyVideoguy
 

Similar to Unit1_File Size Calculation.pptx (20)

add9.5.ppt
add9.5.pptadd9.5.ppt
add9.5.ppt
 
Digital Transmission Fundamentals
Digital Transmission FundamentalsDigital Transmission Fundamentals
Digital Transmission Fundamentals
 
Multimedia
MultimediaMultimedia
Multimedia
 
Digital Image Processing and gis software systems
Digital Image Processing and gis software systemsDigital Image Processing and gis software systems
Digital Image Processing and gis software systems
 
Digital Electronics for Audio
Digital Electronics for AudioDigital Electronics for Audio
Digital Electronics for Audio
 
fundamentals of digital imaging - POONAM.pptx
fundamentals of digital imaging - POONAM.pptxfundamentals of digital imaging - POONAM.pptx
fundamentals of digital imaging - POONAM.pptx
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display Devices
 
Digital audio
Digital audioDigital audio
Digital audio
 
Soundpres
SoundpresSoundpres
Soundpres
 
Audio encoding principles
Audio encoding principlesAudio encoding principles
Audio encoding principles
 
Tools for Information Processes: Organising
Tools for Information Processes: OrganisingTools for Information Processes: Organising
Tools for Information Processes: Organising
 
Chapter 02 audio recording - part i
Chapter 02   audio recording - part iChapter 02   audio recording - part i
Chapter 02 audio recording - part i
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Data Representation in Computers
Data Representation in ComputersData Representation in Computers
Data Representation in Computers
 
Analog to digital conversion
Analog to digital conversionAnalog to digital conversion
Analog to digital conversion
 
Week 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyWeek 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information Technology
 
Digital Audio in Multimedia
Digital Audio in MultimediaDigital Audio in Multimedia
Digital Audio in Multimedia
 
Mm Unit 3
Mm Unit 3Mm Unit 3
Mm Unit 3
 
A1mpeg12 2004
A1mpeg12 2004A1mpeg12 2004
A1mpeg12 2004
 
Chapter Seven
Chapter SevenChapter Seven
Chapter Seven
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 

Unit1_File Size Calculation.pptx

  • 1. Objectives: • Image file representation • Image file calculation
  • 2. Image Representation • Each box represent one pixel • 8 X 8 bit map image • Image size is 64 • Bitmap image - • JPEG • GIF ect…
  • 3. Bitmap graphics: A bitmap file stores the position and color of every pixel that makes up an image. The image is made of millions of pixels and the color of each pixel is stored using a number code. A bitmap is a good way to store photographs. Vector graphics: A vector image is made up of shapes constructed from lines. The computer stores mathematical formulas that tell it how to draw shapes and lines. A vector file is smaller than a bitmap file. Vector graphics are good for images made of simple lines and shapes, for example, cartoons, diagrams, and graphs. Images in digital form
  • 4. • If a bitmap image is made larger, all the dots get bigger and the image looks distorted. This is called pixelation. • Pixelation does not affect vector images, they are drawn to the correct size using the stored mathematical formulas Pixelation
  • 5. • Bitmap images are made up of a two- dimension matrix of pixels. • Each pixel is represented by a binary number. • The bitmap image is stored as a series of binary numbers • A black and white image needs only one bit per pixel (0 or 1) • If each pixel is represented by 2 bits, then the pixel can be one of these four colors. (22 = 4), 00, 01, 10, 11 Bitmap Images
  • 6. Colour depth: The number of bits used to represent each color is called bit depth If 8-bit color depth means that each pixel can be one of 256 colors ( 28 = 256) Image resolution: Number of pixels that make up an image. • An increase in the image will increase the file size Bitmap Images
  • 7. Representation of Sound • Each sound file has a wavelength, frequency, and amplitude. • Sound is analog, so sound waves need to be sampled to be stored in the computer. • Sampling means measuring the amplitude of the sound wave. This is done by ADC. • To convert analog data to digital, the sound waves are sampled at regular time intervals.
  • 8. Fundamentals of Sound Sound Wave • Sound is about vibration. Any sound requires a source, such as a human voice or musical instrument, and a substance to travel through • These vibrations consist of the motion of particles back and forth, knocking with each other and creating a sound wave: an analogue signal that travels in the air.
  • 9. Fundamentals of Sound Amplitude or volume • The amplitude is the intensity (or height) of the sound wave. It relates to the amount of energy the wave carries and it is measured in voltage (V). • If calculated from the crest, it will have a positive peak of energy, for example 10V • If calculated from the trough, it will have a negative peak of energy, for example -10V
  • 10. Fundamentals of Sound Time period (Duration) A wave has a repeated pattern, and one completed repetition is called a cycle (or frequency). Time period is the time necessary to complete a cycle. A complete cycle occurs when the sound wave passes between two consecutive points. This can be: • Two consecutive crests • Two consecutive troughs The formula for calculating the time to complete a cycle is: Time period = 1 / frequency
  • 11. Fundamentals of Sound Frequency • The frequency is the number of completed cycles per second of a sound wave. • To calculate the frequency of a sound wave, you need to calculate the time it takes to complete one wave cycle. The unit used to measure frequency is named hertz (Hz). One hertz is one cycle per second. • • For example, a frequency of 1 hertz means that the wave has one cycle per second.
  • 12. Frequency High-frequency waves appear close together and low-frequency waves appear further apart.
  • 13. Sampling sound A technique used to convert a sound from analogue to digital is sampling. While sampling a sound, the computer takes measurements of the analogue signal at regular time intervals, and then a unique bit pattern of binary numbers is assigned to each sample. After that, the digitised sound can be stored and processed by a computer as a sequence of 1,1s and 0,0s.
  • 15. Representation of Sound Sample resolution: The number of bits per sample is known as sample resolution (bit depth) Sampling Rate (frequency): The number of sound samples taken per second. This is measured in hertz (Hz). 1 Hz = 1 sample per second CDs have a 16-bit sampling resolution and a 4.1 kHz sample rate, that is 44100 Hz samples every second. This gives high-quality sound.
  • 16. Representation of Sound Benefits and drawbacks of using large sampling resolution when recording the sound
  • 17. Image Calculation File size = horizontal pixels × vertical pixels × bit depth ------------------------------------------- 8(to convert to bytes) × 1024 (kilobytes) Bit Depth (Bits Per Pixel) Number of Colours or Tones Where do # of Colours Come From? 1 2 21=2 2 4 22=4 3 8 23=8 4 16 24=16 6 64 26=64 8 256 28=256
  • 18. Image File Calculation A 500dpi image that measures 7 inches by 6 inches with the availability of 65,536 colours would result in the following calculation:
  • 19. Exam Style Questions How many bits per pixel would need to be used if an image used 4 colours instead of 2? 2 bits 2 power 2 = 4
  • 20. Exam Style Questions The image below contain a black and white image consisting of 36 pixels. Explain why 36 bits are needed to represent the pixels in the image . Two colours needed in the image so two possible bit pattens needed 36 pixeles so 36 bits needed
  • 21. Exam Style Questions A bitmapped image with a colour depth of one can represent images that use two colours. How many more colours can be represeted in an image if the colour depth is increased from one to four? 14 16- 2 = 14
  • 22. Exam Style Questions State the minimum number of bits needed to encode 32 different colours? 5 bits
  • 23. Audio file Calculation • Sample rate in Hz • bit depth/ Bit Resolution • Length • Number of channels (mono /Stereo) Sample rate Bit Resolution 11.025kHz 8 Bit 22.05. kHz 8 bit 44.1 kHz 16 bit Sample rate X Bit Resolution X Time (seconds) X Channel Audio file Size = ________________________________________________ 8(to convert to bytes) × 1024 (kilobytes)
  • 24. Audio File calculation Bit Rate: Every second how many bits are taken in that audio. Bit rates are usually measured in kilobits per second (kbps). Bit rate = sample rate X bit resolution X Channels ---------------------------------------------------- 1000
  • 25. Audio File calculation What if the audio is 1 Minute, with a 16 bit resolution and 44.1kHz with the stereo channel. What would be the file size? Size =( 44.1 X 1000 X 16 X 60 X 2) / ( 8 X 1024 X 1024) = 10.09 MB Bit rate = 44100 X 16 X 2 ------------------- = 1411.2 kbps 1000
  • 26. Audio File calculation Five minutes of music is sampled at 40000 samples per second, and each sample is encoded into 16 bits(2 bytes). How big will the resulting music file be? 5 minutes =300 seconds. So there are 300 X 40,000. Each sample occupies 2 bytes, making a file size of = 300 X 40000 X 2 bytes = 24,000000 bytes = 24 MB
  • 27. Audio File calculation Five minutes of music is sampled at 8000 samples per second, and each sample is encoded into 16 bits(2 bytes). How big will the resulting music file be?
  • 29. Lossless Compression Breaking up the files into “smaller” form for transmission or storage and then putting it back together . Example: • Text Files • ZIP files format • UNIX tool GZIP G • GIF
  • 30. Lossy Compression These programs simply eliminate "unnecessary" bits of information, tailoring the file so that it is smaller. This type of compression is used a lot for reducing the file size of bitmap pictures, which tend to be fairly bulky. Example: • JPEG • MP4 • MP3
  • 31. An image is 3072 pixels by 2304. Calculate: • The total number of pixels in the original image • The number if bytes occupied by this file • The file size of the jpeg image ( in MB) if the original image was reduced by a factor of 5 • How many uncompressed file of the size calculated in above could be stored on a 4 gigabyte memory card. • How many compressed files of the size calculated above could be store in 4 gigabyte memory card Activity -1
  • 32. Storage size Document / Spread sheet Database ( MS ACCESS) 1 Byte Single character in text Whole number 0 to 255 Text data type Whole number (-128 to +127) ---Number / BYTE data type Yes/ NO data type 2 byte A single character for a large Asian character set The whole number (-3200 to +3200) ----- Number/ Integer / Short data type 4 Byte Whole number between - 2 billion to +2 billion Single precision/ Floating point Number/ Long Integer type Number / Single data type (6 decimal digits) 8 bytes Double precisions Floating Point (15 digits) Massive whole numbers Number / Double Data type Date/Time Data type Currency Data type TEXT / Database file Size Calculations Standard data types size:
  • 33. Usually text files uses ASCII format. It code the text files in denary or hexadecimal. (RLE – Run Length Encoding) The phrase “ THIS SECTION SHOWS YOU HOW THIS WORLD” 35 “1 SECTION S2S Y3 2 1 W3LD WORK” 23 mem ory units Text File Compression  Repeated word THIS is replaced as number 1  HOW and OU is replaced as number 2 and 3  Spaces are ignored and 33% of file size saved  Text files uses the Lossless file compression.
  • 34. Image File Compression – RLE https://www.csfieldguide.org.nz/en/interactives/run-length-encoding/ https://www.dcode.fr/rle-compression#f1 RLE Calculator
  • 35. Estimate the file size of the word document which contains 2000 characters and a small image which is 300 X 300 pixels in size with 8 colors. Assume an extra 20 KB for other document features.[4] Characters = 2000 bytes Image size = 300 X 300 X 3 = 270000 bits = 33750 bytes Extra = 20 KB = 20480 bytes Exercise - 1 File size = 2000 +33750 + 20480 = 56230 bytes = 54.9 KB Or = 2000 + 33750 + 20000 = 55750 / 1000 = 55. 7 KB
  • 36. A database is to contain a person’s name and their address. Decide the maximum number of characters you would need to input a name and an address. Estimate the maximum size of files needed to store the name and address. Exercise - 2
  • 37. A security system contain a password (16 characters long), a username(20 characters long), a small photo(256 X 640 pixels in size) and a security questions ( up to 72 characters long). Estimate the file size needed to store all this data Exercise - 3
  • 38. MIDI - Musical Instrument Digital Interface MIDI files are not music and don’t contain any sounds MIDI represents the information needed to recreate a performance as many individual pieces of data. MIDI is a communications protocol that allows electronic sounds to interact with each other
  • 39. MIDI Devices Devices that can be controlled with MIDI include: Keyboards Synths Effects units MIDI Interface/Control Devices Lighting Boards Mixers Computer Programs – computers Fireworks MIDI - Musical Instrument Digital Interface
  • 40. MIDI - Musical Instrument Digital Interface  MIDI Cable – 5 pin DIN connectors  MIDI Interface – Multiple inputs and outputs which can digitally route MIDI Messages on the fly, much like a patch bay.
  • 41.  This is a typical MIDI/Computer setup.  Additional devices can either be routed by the interface or connected to the MIDI THRU of the preceding device.  Devices can be directly routed to one another without the need of a computer or interface MIDI Setups
  • 42. MIDI commands • The fist byte is the status byte – Informs the MIDI device what function to perform. • MIDI has 16 channels( 0 to 15) • Pitch Byte – tells which byte to play) • Velocity Byte – tells how loud to play notes • Note on/off - tells that a key has been pressed/released • Key pressure - tells how loudness of the music note
  • 43. Sequencer Software is needed to play back the MIDI files in any instrument. MIDI files may be converted to MP3, WAV, WMA, FLAC, OGG, AAC, MPC on any Windows platform using Total Audio Converter MIDI
  • 44. Upload Uploading means data is being sent from your computer to the internet Example : • Sending Email • Positng photos on social media • Using webcam
  • 45. Download Downloading means data your computer is receiving data from the Internet the internet Example : • opening webpage • Receiving email • Purchasing any files • Watching online videos
  • 46. A company which offers the following Internet broadband transfer rates: • 56 megabits per second DOWNLOAD • 16 megabits per second UPLOAD If each music track is 3.5 megabytes in size, how long would it take Juan to download his 40 tracks? 40 tracks = 40 X 3.5 = 140 MB 56 megabits/sec = 7 Mbyte/sec Time take to download the tracks = 140/7 = 20 Seconds
  • 47. Dima has agreed to send Michaela a 20 megabyte file. They both have a broadband connection. Dima has to upload his file to a server and then Michaela needs to download it from the same server. The broadband data transfer rates (speeds) are: 1 megabits per second to upload a file 8 megabits per second to download a file (Note: 8 bits = 1 byte) a. How long does it take to upload Dima’s file? b. How long does it take to download Dima’s file?
  • 48. A company advertises its Internet broadband speeds as follows: • download speed of 128 megabits per second • upload speed of 16 megabits per second (8 bits = 1 byte) a) Explain what is meant by the two terms download speed and upload speed (b) How many 4-megabyte files could be downloaded per second using this company’s broadband
  • 49. David has a photo that is 2MB. How many of these can he store on his 3GB memory stick? 3 * 1000 = 3000 3000 / 2 = 1500
  • 50. Number the data storage units from 1 (smallest) to 9 (largest). The first one has been done for you.