Graphics File Formats.

Slides:



Advertisements
Similar presentations
Iframes & Images Using HTML.
Advertisements

CS 128/ES Lecture 7a1 Data – How (Much of) It Is Stored.
Multimedia for the Web: Creating Digital Excitement Multimedia Element -- Graphics.
Nice Calm Scene. (You’ll need it.). Skills Getting files off of the camera or scanner Getting files off of the camera or scanner Archiving Archiving Choosing.
ISYS 3074 Graphics File Formats File formats have developed with applications. At least 50 currently in use. Examples include: GIF, JPEG, TIFF, BMP, DIB,
Graphics on the Web CS575 Spring 2006 Dr.Abbot Student: Andre Liv.
Image and Sound Editing Raed S. Rasheed Image Image. Digital image. – Raster images. – Vector Images. – Stereo Images. – Image File Formats Lossless.
Manipulating Images Image A visual representation of something that is seen in real life. It can be two-dimensional or three-dimensional A visual representation.
Part A Multimedia Production Rico Yu. Part A Multimedia Production Ch.1 Text Ch.2 Graphics Ch.3 Sound Ch.4 Animations Ch.5 Video.
HYPERTEXT MARKUP LANGUAGE (HTML)
Chapter 3 Adding Images in HTML. Agenda Understanding Web Page Images Prepare Your Images for the Web Insert an Image Specify an Image Size Add Alternative.
Fundamentals of Multimedia
Prepared by George Holt Digital Photography BITMAP GRAPHIC ESSENTIALS.
School of Computer Science & Information Technology G6DPMM - Lecture 4 Graphics & Still Image Representation.
CS 1308 Computer Literacy and the Internet. Creating Digital Pictures  A traditional photograph is an analog representation of an image.  Digitizing.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
File Formats About graphic file formats And image compression.
Lecture 4 - Introduction to Computer Graphics
Graphics/Image Data Types
Image Storage Bitmapped Graphics – in which an image is represented as a collection of dots Vector Graphics – in which an image is represented as a set.
All About File Formats Mr. Butler John Jay High School Department of Technology.
Presentation Design: Graphics. More About Color “Bit depth” of colors -- This is based on the smallest unit of information that a computer understands.
Digital Image: Representation & Processing (2/2) Lecture-3
Common file formats  Lesson Objective: Understanding common file formats and their differences.  Learning Outcome:  Describe the type of files which.
Multimedia Specification Design and Production 2012 / Semester 1 / L3 Lecturer: Dr. Nikos Gazepidis
Information Processes and Technology Multimedia: Graphics.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 3 This presentation © 2004, MacAvon Media Productions Introduction to Computer Graphics.
File Formats Different applications (programs) store data in different formats. Applications support some file formats and not others. Open…, Save…, Save.
Web Graphics. Colours and Display Graphics and Modems 28.8kbps = 3.6 KB per second 36 KB takes 10 seconds to load. Pixels and color.
File Format. Graphics file Format GIF (Graphics Interchange Format) JPEG (Joint Photographic Experts Group) PNG (Portable Network Graphics) TIFF (Tag.
2D Graphics Theory & Principles. Single Point Smallest addressable area on screen or digital image.
File Formats and Vector Graphics. File Types Images and data are stored in files. Each software application uses different native file types and file.
VRML virtual reality modeling language. what is it? standardised (sort of) notation for virtual reality over the web text file (use normal text editor)
Chapter 2 File Format Objectives (1 of 2) Identify the difference between vector based graphics and bitmap-based graphics Clarify bitmap and vector graphic.
Multimedia Basics (1) Hongli Luo CEIT, IPFW. Topics r Image data type r Color Model : m RGB, CMY, CMYK, YUV, YIQ, YCbCr r Analog Video – NTSC, PAL r Digital.
Graphics & Images What File Format Do I Use?. Graphics & Images …..are visual images presented on some form of media (drawings, print, web, digital video)
Image formats Characteristics © Adolf Knoll, National Library of the Czech Republic.
Raster Graphics 2.01 Investigate graphic image design.
Moving Image Compression and File Formats. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Image File Formats. What is an Image File Format? Image file formats are standard way of organizing and storing of image files. Image files are composed.
Image File Formats By Dr. Rajeev Srivastava 1. Image File Formats Header and Image data. A typical image file format contains two fields namely Dr. Rajeev.
HTTP transaction with Graphics HTML file + two graphics files.
Image File Formats Harrow Computer Club – Wed, 1 Dec 2010 Bob Watson MA CMath MIMA MBCS.
Image Editing Vocabulary Words Pioneer Library System Norman Public Library Nancy Rimassa, Trainer Thanks to Wikipedia ( help.
Chapter 1 Definitions & Basics of Digital Image 1.Image 2.Digital Image 3.Raster 4. Vector 5.Image Editing 1.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
2.01 Understand Digital Raster Graphics
File Formats Different applications (programs) store data in different formats. Applications support some file formats and not others. Open…, Save…, Save.
Common Bitmap Image File Types
2.01 Understand Digital Raster Graphics
Graphics and image data representation
Computer Science Higher
2.01 Understand Digital Raster Graphics
Chapter 3 Graphics and Image Data Representations
2.01 Investigate graphic image design.
Chapter 3 Image Files © 2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
A computer display is made up of small squares, called pixels.
Fundamentals of Multimedia
Chapter 3:- Graphics Eyad Alshareef Eyad Alshareef.
1.01 Investigate graphic types and file formats.
Introduction to Computer Graphics
Web Design and Development
2.01 Understand Digital Raster Graphics
2.01 Investigate graphic image design.
2.01 Understand Digital Raster Graphics
Multimedia System Image
2.01 Investigate graphic image design.
Lecture 4 - Introduction to Computer Graphics
2.01 Investigate graphic image design.
Presentation transcript:

Graphics File Formats

Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d like to thank Prof. Leslie Smith and Dr. Bruce Graham who create such a good work on these lecture notes.

Graphics File Formats Why have graphics file formats? What to look for when choosing a file format A sample tour of different file formats, including – bitmap-based formats – vector-based formats – metafiles – proprietary formats – fractal compression formats

Graphics File Formats Need to store and retrieve graphical data in an efficient and logical way Data stored according to specific format conventions Formats are immortal (!) - technology evolves, new formats appear, but the old ones will still be there! No one universal format - different formats for different purposes You (probably) won’t need to access the formats in detail – there is (usually) library code to input/output/convert images for you! – useful to understand what is going on “behind the scenes”, for making the best image format choices

Terminology (…or what to look out for in file formats) When choosing which is more appropriate for your purpose, some common factors to consider: Lossy or lossless compression? What is the compression ratio in this case? 8-bit or 7 -bit (binary or text)? Is it stored at a fixed resolution? How many images per file (static or animated)? ….amongst other things

Bitmaps Simplified structure of a bitmap file: In practice there are many format variations

PBM, PGM, PPM Family of portable bitmaps Designed to be as simple as possible! Written in ASCII – 7 bit code No compression 1 image per file

PBM Portable Bit Map For Black/White images P1 # feep.pbm 24 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0

PGM Portable Grey Map For monochrome images P2 # feep.pgm 24 7 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0 0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0 0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

PPM Portable Pix Map For colour images P3 # sq.ppm 4 4 15 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0

BMP Standard bitmap storage format for Microsoft Windows (also supported by some other non-Microsoft applications) – Never meant to be portable – Nor meant for a data interchange format across different operating systems 1 image per file Uses RLE (run-length encoding) – therefore uses lossless compression – original bitmap did not support compression! Huge file sizes! – e.g. sample 470x682 photo stored as 40.3K JPG file is a 963K BMP file

BMP

GIF Graphics Interchange Format (1987 and 1989 versions) – The format specification says it is to be pronounced “jif” Uses a palette of up to 256 colours – not good for photographs, but great for text/diagrams Uses LZW compression of the bitmap data – causes copyright problems (Unisys patent)! – reasonably easy to read and decompress Supports multiple images (animation!!) 1989 version supports transparency and interlacing – At most one colour in the palette may be declared transparent

GIF

Interlacing of Pixel Data

Interlacing

PNG Portable Network Graphics – informally known as “PNG Not GIF” – pronounced “ping” Successor to GIF (lossless but free) Not a restricted palette - up to 48-bit truecolour Supports transparency, interlacing, but not animation – animation available in a related format, MNG Transparency through an alpha channel – also supports anti-aliasing Compression marginally better than GIFs, based on LZ77 (earlier than LZW)

JFIF JFIF - JPEG File Interchange Format There is no (single) JPEG format! JPEG more commonly refers to the compression algorithms used – typically between 10:1 and 20:1 for photographs Basically a data stream with a few restrictions and identifying markers

TIFF Tag Image File Format Designed primarily for desktop publishing and related applications Contains lots of tags in the file, identifying different types of content Rationale behind using tags is that it is easier to incorporate new features in future versions of the format without confusing old software, or making old TIFF images useless Very complex!

FIG Facility for Interactive Generation of figures Proprietary vector format for xfig drawing program ASCII text file

FIG Example FIG: 227bytes GIF: 1.49kb PNG: 2.12kb JPG: 6.42kb #FIG 3.2 Landscape Center Inches Letter 100.00 Single -2 1200 2 1 3 0 1 6 6 10 0 20 0.000 1 0.0000 3976 2992 1665 1665 3976 2992 5641 2992 2 2 0 1 4 4 100 0 20 0.000 0 0 -1 0 0 5 600 675 4500 675 4500 3450 600 3450 600 675 FIG: 227bytes GIF: 1.49kb PNG: 2.12kb JPG: 6.42kb

SVG - Scalable Vector Graphics XML language for vector graphics in web pages – plugins available for Explorer and Netscape Text file containing only SVG or embedded in HTML

SVG Example

CGM Computer Graphics Metafile Three different encodings – One for minimal size/ease of transmission – Binary encoded for speed of access – Clear text encoding for human readability/editing Primarily vector graphics, but also bitmap data An ISO standard

POVRay POVRay is a 3D computer graphics ray-tracing rendering program – it has its own proprietary 3D scene-based format, looks like program code – e.g.

global_settings { assumed_gamma 2.2 } #include "colors.inc" #include "shapes.inc" #include "textures.inc" #include "stones.inc" camera { location <0, 45, -40> direction <0, 0, 1.5> look_at <0, 0, 0> } light_source { <30, 20, -10> color White area_light <4, 0, 0>, <0, 0, 4>, 9, 9 plane { y, 0 pigment { Tan } finish { crand 0.015 ambient 0.12 diffuse 0.8 } cylinder { <0, -4, 0>, <0, 4, 0>, 2.5 translate <-7, 4, -8> texture { T_Stone18 }

VRML Virtual Reality Modelling Language Interactive 3D worlds: browser plugin available

VRML Code #VRML V1.0 ascii Separator { DirectionalLight { Translation { translation 3 0 1 } Sphere { radius 2.3 } } Separator { # The blue cube Material { diffuseColor 0 0 1 # Blue Transform { translation -2.4 .2 1 rotation 0 1 1 .9 Cube {} #VRML V1.0 ascii Separator { DirectionalLight { # Light shining from viewer into scene direction 0 0 -1 } PerspectiveCamera { position -8.6 2.1 5.6 orientation -0.1352 -0.9831 -0.1233 1.1417 focalDistance 10.84 Separator { # The red sphere Material { diffuseColor 1 0 0 # Red

FIF FIF (Fractal Image Format) Barnsley (and later, Jacquin) developed the compression technique Commercial format by Iterated System Inc. Suffers from over-hype and commercialization – claims of several thousand to one compression ratios Realistic compression ratios range from 4:1 to 100:1 FIF good for most pictures, particularly photographs/scenes, with elements of self-similarity (not difficult!)

Comparison of Images

raw data 100% 100% 100% PPM 407% 406% 406% BMP 100% 33% 33% GIF 19% 18% 1% PNG 32% 16% 1% TIFF (LZW) 111% 18% 1% JPEG 5% 5% 10% FIF 5% 6% 3%