Wednesday, 26 August 2015

Multimedia Technology: Chapter 3 - Image File Formats: Choosing the Right Tool for the Job

Multimedia Technology: Chapter 3 - Image File Formats: Choosing the Right Tool for the Job


This chapter discusses various Image file formats, JPG, GIF, PNG, TIF, Difference between JPG vs GIF vs PNG.

Multimedia Technology Lecture 11|Image File Formats Revision |JPEG | GIFF | PNG images | JPG vs GIFF
Lecture Contents:
  • Graphical Raster Devices
  • Popular file Formats
  • Graphical Image File Format (GIFF)
  • JPEG / JPG
  •  JPEG vs GIF
  • Portable Graphics Network (PNG)
  • Comparision between JPG vs. PNG
  • Tagged Image file Format (TIFF)
  • Exchange Image File (EXIF)
  • System Dependent File Formats

(H1) Multimedia Technology: Chapter 3 - Image File Formats: Choosing the Right Tool for the Job

Hello everyone, and welcome back to Zeeshan Academy! I'm Prof. Dr. Zeeshan Bhatti. We've already explored how images are built from pixels and vectors and how color is represented. Now, it's time to answer a question you face every time you save a design or a photo: "Which format should I use?"

Understanding image file formats is like knowing the difference between a sprinter and a marathon runner; both are athletes, but you use them for completely different races. In this chapter, we'll dissect the most popular image formats—JPG, GIF, PNG, and TIFF—so you can always pick the champion for your project.

The Foundation: Raster Devices and Pixels

Before we dive into formats, let's quickly recap. Most of the formats we're discussing today are for raster images (or bitmaps). These are images composed of a grid of individual pixels, each with its own color value. Your computer monitor, smartphone screen, and digital camera sensor are all graphical raster devices that display or capture these pixels. The way we store and compress this grid of pixels is what defines a file format.

The Contenders: A Guide to Popular File Formats

GIF: The Animated Classic

  • Full Name: Graphics Interchange Format

  • Best For: Simple animations, logos with solid colors, and graphics with sharp edges.

  • The Nitty-Gritty:

    • Color Limitation: This is GIF's biggest strength and weakness. It's limited to a palette of just 256 colors. This makes it terrible for photographs but perfect for graphics with few distinctive colors.

    • Compression: It uses LZW compression, which is lossless. This means no image data is lost when the file is saved.

    • Transparency: GIF supports a crude form of transparency, where a single color in the palette can be set to be completely transparent. There are no semi-transparent pixels.

    • Interlacing: This allows an image to load in passes, starting blurry and becoming clearer, which was useful in the days of slow modems.

    • Animation: The famous feature! A GIF file can store multiple frames to create a looping animation.

    • Fun Fact: GIF was devised by UNISYS and CompuServe, and its patented LZW compression once caused legal headaches, which is partly what led to the creation of PNG.

JPEG/JPG: The King of Photographs

  • Full Name: Joint Photographic Experts Group

  • Best For: Photographs, complex images with smooth color gradients, and any image where file size is a priority.

  • The Nitty-Gritty:

    • Compression: JPEG uses lossy compression. This means it permanently discards data to achieve much smaller file sizes. The key here is that it's designed to discard information the human eye is less likely to notice.

    • Quality Control: You can usually set a quality level when saving (e.g., 1-100% or Low-High). Higher quality means less compression and a larger file.

    • The Trade-off: Every time you edit and re-save a JPEG, you lose more data, leading to a gradual degradation in quality known as "generation loss." It's best used as a final delivery format, not an editing format.

    • What it Lacks: No support for transparency or animation.

JPEG vs. GIF: The Classic Showdown

So, when do you choose one over the other? It's simple:

  • Use JPEG for: Photos, realistic artwork, and any image with millions of colors and soft gradients.

  • Use GIF for: Logos, line art, simple cartoons, and when you need animation or a simple, hard-edged transparency.

If you save a photograph as a GIF, it will look posterized and blotchy. If you save a logo as a JPEG, it will look blurry and might have a "halo" of artifacts around the text.

PNG: The Modern Web Favorite

  • Full Name: Portable Network Graphics

  • Best For: Web graphics requiring transparency, logos, screenshots, and images where quality is paramount and file size is secondary to JPEG.

  • The Nitty-Gritty:

    • The GIF Replacement: PNG was created as a patent-free improvement over GIF.

    • Compression: It uses the ZIP compression algorithm, which is lossless. Your image quality remains perfect after saving.

    • Color Depth: It supports 24-bit RGB color (millions of colors) as well as 8-bit paletted color, making it far more versatile than GIF.

    • Transparency (The Killer Feature): PNG supports alpha channel transparency. This means each pixel can have 256 levels of transparency, from completely opaque to completely transparent. This allows for smooth, soft edges and shadows that blend seamlessly with any background.

    • No Animation: Standard PNG does not support animation (though a variant called APNG does).

JPG vs. PNG: The Modern Dilemma

This is the most common choice for web developers and designers today.

  • Use JPG for: Complex photographs and images on your website where fast loading is critical.

  • Use PNG for: Any graphic that requires transparency (like a logo over a background), images with sharp edges and text (like screenshots), and when you need a lossless format for editing.

TIFF: The Professional's Archive

  • Full Name: Tagged Image File Format

  • Best For: Professional photography, printing, and archival storage.

  • The Nitty-Gritty:

    • Flexibility is Key: TIFF is a container format that can store images with many different types of data (monochrome, grayscale, 8-bit & 24-bit RGB) and compression methods.

    • Lossless (Usually): It is most often used as a lossless format, preserving all image data. However, it can also optionally use JPEG compression for a smaller, lossy file.

    • Tags: The "tagged" structure allows for a wealth of additional information to be stored within the file, such as layers, transparency, and printer settings.

    • The Downside: File sizes are very large, and it's not well-suited for the web.

 EXIF: The Data Sidekick

  • Full Name: Exchangeable Image File Format

  • What it is: EXIF isn't an image format itself; it's a metadata standard that is embedded into files (most commonly JPEGs and TIFFs) created by digital cameras.

  • What it Stores: This "data about the data" is incredibly valuable. It includes:

    • Camera Settings: Shutter speed, aperture, ISO, focal length.

    • Date and Time: When the photo was taken.

    • GPS Data: Where the photo was taken (geotagging).

    • Copyright Information.

  • Modern Evolution: Many camera manufacturers also have their own proprietary "raw" formats (like Nikon's NEF, which is based on the TIFF/EP structure) that contain even more unprocessed sensor data for maximum editing flexibility.

System-Dependent File Formats

It's also worth mentioning formats like .BMP (Windows Bitmap) and .PICT (old Macintosh). These are generally uncompressed, system-specific formats that result in very large files. They are largely obsolete for general use but are sometimes used internally by operating systems or specific applications.

Conclusion: Your Quick-Reference Guide

To sum it all up, here’s your cheat sheet:

  • Photograph on a Website? -> JPG

  • Logo or Graphic with Transparency? -> PNG

  • Simple Animation? -> GIF

  • Professional Editing or Printing? -> TIFF

  • Need Camera Data? -> Check the EXIF info in your JPG or RAW file.

Choosing the right format is a fundamental skill that affects the quality, performance, and professionalism of your multimedia projects. In our next chapter, we'll add another layer to our visual understanding by exploring the science of Color in Images and Video.

Until then, I encourage you to take a single image and save it in each of these formats. Compare the file sizes and quality with your own eyes. There's no better way to learn!

Prof. Dr. Zeeshan Bhatti
Zeeshan Academy - https://www.youtube.com/@ZeeshanAcademy

GIF (GIF87A, GIF89A)

 Graphics Interchange Format (GIF) devised by the UNISYS Corp. And Compuserve, initially for transmitting graphical images over phone lines via modems.
GIF standard is limited to only 8-bit (256) colour images, suitable for images with few distinctive colours (e.g., graphics drawing). One byte per pixel.
GIF reduces colors to 256 (256 from 224 colors). Uses a colour map of 256 possible RGB values, contained in file. Only the 8 bit index is transmitted for each pixel that contains the closest match color to the original one.
Supports interlacing. - successive display of pixels in widely-spaced rows by a 4-pass display process.

 JPEG / JPG

JPEG: The most important current standard for image compression.
A standard for photographic image compression created by the Joint Photographics Experts Group
• Takes advantage of limitations in the human vision system to achieve high rates of compression.
•JPEG allows the user to set a desired level of quality, or compression ratio (input divided by output).
• Lossy compression which allows user to set the desired level of quality/ compression.

PNG

PNG stands for Portable Network Graphics (PNG). The PNG format is intended as a replacement for GIF in the WWW and in image editing.
GIF uses LZW compression, which is patented by Unisys. All uses of GIF may have to pay royalties to Unisys - PNG contains no patented technology.
PNG uses unpatented zip technology for compression
Provides transparency using alpha value.
2 Dimensional interlacing.  

TIFF

Tagged Image File Format (TIFF), stores many different types of images
(e.g., monochrome, greyscale, 8-bit & 24-bit RGB, etc.) –> tagged
• The support for attachment of additional information (referred to as \tags") provides a great deal of flexibility.
• Developed by the Aldus Corp. in the 1980’s and later supported by the Microsoft
The most important tag is a format signifier: what type of compression etc. is in use in the stored image.
• TIFF is a lossless format (but now a new JPEG tag allows one to opt for JPEG compression).
• It does not provide any major advantages over JPEG and is not as user controllable it appears to be declining in popularity

EXIF ( NOW NEF)

 (Exchang  Image File) is an image format for digital cameras:
1. Compressed EXIF _les use the baseline JPEG format.
2. A variety of tags (many more than in TIFF) are available to facilitate higher quality printing, since information about the camera and picture-taking conditions (flash, exposure, light source, white balance, type of scene, etc.) can be stored and used by printers for possible color correction algorithms.
3. The EXIF standard also includes specification of file format for audio that accompanies digital images. As well, it also supports tags for information needed for conversion to FlashPix (initially developed by Kodak).


Chapter 3_ Images File Formats

Multimedia Technology Chapter 4: Color in Images and Video

Multimedia Technology

Chapter 4, Color in Images and Video


Multimedia Technology Lecture 12  | Color Theory | Color Data | Color in Images | RGB

Contents Of Lecture

  • Color Science: Light and Spectra
  •  Spectrophotometer
  • Human Vision
  • Color
  • The Eye
  • Color Blindness
  • RGB - Additive Color
  • HSB Model
  • CMYK Model
  • Printing Press Process
  • Color Gamut
  • CLUT OR Palette
  • History Of Colour
  • Properties and Attributes of Color 

  Color, Color properties, history of Color, RGB, CMYK 

Multimedia Technology: Chapter 4 - The Science and Art of Color in Images and Video

Welcome back, everyone, to Zeeshan Academy! I'm Prof. Dr. Zeeshan Bhatti, and we're about to dive into one of the most fascinating and fundamental topics in all of multimedia: Color.

Color is not just a decorative element; it's a language. It conveys mood, draws attention, signifies meaning, and creates realism. But what we perceive as "red" or "blue" is actually a complex interplay between physics, biology, and technology. In this chapter, we'll unravel this mystery, moving from the physics of light to how your screen and printer recreate it.

Color Science: It All Starts with Light

To understand color, we must first understand light. Visible light is a small part of the electromagnetic spectrum that our eyes can detect. Sir Isaac Newton famously demonstrated that white light, when passed through a prism, splits into a spectrum of colors—red, orange, yellow, green, blue, indigo, and violet.

  • Light and Spectra: Every light source emits a unique combination of these wavelengths. The sun emits a relatively continuous spectrum, while a neon sign emits light only at specific wavelengths. A Spectrophotometer is a device used to measure the intensity of these wavelengths, giving us a precise "fingerprint" of a color's spectral makeup.

The Human Vision System: The Ultimate Color Renderer

The real magic of color happens not in the world, but inside our heads. Our eyes and brain are the ultimate color processing system.

The Eye: A Biological Sensor
Think of your eye as a sophisticated camera:

  • The cornea and lens focus light onto the retina.

  • The retina contains two types of photoreceptor cells: rods (for low-light vision) and cones (for color vision).

  • We have three types of cones, each sensitive to different wavelengths of light: Long (L) peaking in reds, Medium (M) in greens, and Short (S) in blues.

  • The brain interprets the signals from these three cone types to create our perception of millions of colors.

 Color Blindness
When one or more types of cones don't function properly, it results in color vision deficiency, commonly known as color blindness. The most common form is difficulty distinguishing between red and green. This is a critical consideration for design—using color alone to convey information can exclude a significant portion of your audience. Always use color and symbols or patterns.

Modeling Color: From Light to Ink

Since we can't transmit light spectra directly through a computer, we use mathematical models to represent color. The two most important models are RGB and CMYK.

RGB: The Additive Color Model for Screens
This is the model of light. It's called additive because you start with black (no light) and add different colored lights to create new colors.

  • R (Red), G (Green), B (Blue) are the primary colors.

  • When combined at full intensity, they create white light.

  • This is the native model for all emissive devices: your computer monitor, smartphone, TV, and projector.

  • Each color channel is typically represented by 8 bits (0-255), allowing for 256 shades per channel. Combined, this gives us 256 x 256 x 256 = 16.7 million possible colors (24-bit "True Color").

The HSB/HSV Model: An Intuitive Approach
Working with RGB values like (123, 76, 201) isn't very intuitive for artists. Therefore, the HSB (Hue, Saturation, Brightness) or HSV (Hue, Saturation, Value) model was created.

  • Hue: The actual pigment or color family (e.g., red, yellow, blue). Represented as an angle on a color wheel (0-360°).

  • Saturation: The intensity or purity of the color. 0% is grayscale, 100% is fully vivid.

  • Brightness/Value: The lightness or darkness of the color. 0% is black, 100% is the full brightness of the chosen hue.
    This model is the basis for color pickers in software like Photoshop and Premiere Pro because it aligns with how we naturally think about color.

CMYK: The Subtractive Color Model for Print
This is the model of pigments and inks. It's called subtractive because you start with a white surface (like paper) and subtract wavelengths of light by adding ink. The inks act as filters.

  • C (Cyan), M (Magenta), Y (Yellow) are the primary colors of ink.

  • In theory, combining CMY should produce black, but in practice, it creates a muddy brown. Therefore, K (Key - Black) is added to create deep shadows, improve contrast, and reduce ink costs.

  • This is the standard model for the Printing Press Process (both commercial and your home printer).

Color Gamut: The Realm of Reproducible Colors

Here's a critical concept that often causes confusion: not all colors can be reproduced by all devices. The range of colors a device can produce is called its Color Gamut.

  • The Challenge: The gamut of colors visible to the human eye is vast. The gamut of an RGB monitor is smaller, and the gamut of a CMYK printer is smaller still.

  • What this means: That brilliant, neon-red you see on your screen might be impossible to print with standard inks. It falls "outside" the CMYK gamut. This is why professionally printed materials can sometimes look less vibrant than their on-screen versions.

  • Modern Solutions: Newer standards like DCI-P3 and Rec. 2020 are expanding the gamut of high-end displays, getting us closer to the full spectrum we can see.

A Brief History of Color Technology

Understanding where we came from helps appreciate where we are. The history of color in media is a story of technological innovation.

  • Early Displays: Early computers were monochrome (green or amber text on a black screen). Introducing color was a major breakthrough.

  • The CLUT or Palette: Due to limited memory, early color systems (like those supporting 256 colors) used a Color Look-Up Table (CLUT). Instead of storing RGB values for every pixel, the system stored a palette of 256 specific colors. Each pixel held an index number (0-255) pointing to a color in this table. This was efficient but limiting for photographs.

  • The True Color Revolution: As processing power and memory grew, 24-bit "True Color" became the standard, freeing us from the constraints of the CLUT and enabling photorealistic imagery.

The Properties and Attributes of Color

To work with color professionally, you need a precise vocabulary. Let's define the key properties:

  1. Hue: This is what we typically mean when we say "color." It's the attribute of a visual sensation according to which an area appears to be similar to one of the perceived colors: red, yellow, green, and blue, or a combination of them.

  2. Saturation (or Chroma): This describes the intensity or purity of a color. A highly saturated color is vivid and strong. A desaturated color is muted and moves towards gray.

  3. Lightness (or Value/Brightness): This refers to how light or dark a color is. Adding white increases lightness (creating a "tint"), while adding black decreases it (creating a "shade").

Mastering the relationship between these three properties is the key to creating harmonious and effective color schemes in your multimedia projects.

Conclusion: Color as a Core Competency

As you can see, color is far more than a simple choice from a palette. It's a deep field spanning physics, biology, and engineering. Understanding the difference between additive and subtractive models, the limitations of color gamuts, and the biology of perception will make you a more effective and intentional multimedia creator.

For your next task, I want you to open any image editing software. Create a brilliant red square in RGB mode. Then, without changing the color, change the document's color mode to CMYK. Observe how the color may shift to fit the smaller CMYK gamut. This simple exercise will make the theory of gamut limitation instantly real.

In our next chapter, we'll put images and color into motion as we explore the world of Video Compression and Codecs.

Until then, see the world in all its brilliant color!

Prof. Dr. Zeeshan Bhatti
Zeeshan Academy - https://www.youtube.com/@ZeeshanAcademy


RED
(High Voltage, I am Available, Only you can see, I will tease you, don’t touch me)
       Fire
       Blood
       Energy
       War
       Danger
       Strength
       Power
       Passion
       Love
       Desire
       Anger

Light red represents joy, passion, sensitivity, and love. Pink signifies romance, love, and friendship. It denotes feminine qualities and passiveness.

Dark red is associated with vigor, willpower, rage, anger, leadership, courage, longing, malice, and wrath.
 
Brown suggests stability and denotes masculine qualities.
Reddish brown is associated with harvest and fall


Orange (Creativity, Attraction, success you will get,  Young)
—Joy
—Sunshine
—enthusiasm
—Fascination
—happiness
—Creativity
—determination 
•attraction
•success
•encouragement
•stimulation 
Dark orange can mean deceit and distrust.
Red-orange corresponds to desire, pleasure, domination, aggression, and thirst for action.
Gold evokes the feeling of prestige. The meaning of gold is illumination, wisdom, and wealth. Gold often symbolizes high quality.


Yellow (Sunshine, New Dawn, Intellect, Happiness)
  warming effect
  arouses cheerfulness
  generates muscle energy
  honor
  loyalty
  cowardice
  Dull (dingy) yellow represents caution, decay, sickness, and jealousy.
Light yellow is associated with intellect, freshness, and joy.


Green (Nature, healing power, hope )
  Growth
  Harmony
  Freshness
  Fertility
  Emotion Safety
  Pure Money
  hope

Dark green is associated with ambition, greed, and jealousy.
Yellow-green can indicate sickness, cowardice, discord, and jealousy.
Aqua is associated with emotional healing and protection.
Olive green is the traditional color of peace

Blue (Future, Dream, Depth Stability)
  trust
  Loyalty
  Wisdom
  Confidence
  intelligence
  faith
  Truth
  Heaven
  Sea
  Sky
  Ocean Depth

Light blue is associated with health, healing, tranquility, understanding, and softness.
Dark blue represents knowledge, power, integrity, and seriousness.


Purple (Power, Nobility, Luxury, can’t beat me)
  Wealth
  Extravagance
  Wisdom
  Dignity
  Independence
  Creativity
  Mystery
  Magic
  Royalty
  Artificial

Light purple evokes romantic and nostalgic feelings.
Dark purple evokes gloom and sad feelings. It can cause frustration.


White (God, Pure, Truth, Mother, I will be there for you)
  Goodness
  Innocence
  Purity
  color of perfection
  Safety
  Cleanliness
  Spirit
  Coolness
  Hospitals
  Doctors
  Sterility


What ever it takessss , whatever heart breakssss, I will be right there waiting for you. La..la.lala……lalalala
(a song…)

Black (Death, Evil)
  Power
  Elegance
  Formality
  Death
  Evil
  Mystery
  Fear
  Black holes
  Negative strength and  authority
  Grief
  Sorrow
  Pain

I will destroy you, break you, give you pain, not leave you alone



 


Featured post

👉 🔥 Master Full Stack Web Development | Week-1 Lecture-1 - HTML & Frontend vs Backend, Dr. Zeeshan Bhatti

  Hey there, future coders! Welcome to the most exciting journey of your life. I'm  Dr. Zeeshan Bhatti  from  Zeeshan Academy , and you...