JPEG: Currently the Most Important Common File Format

Total Page:16

File Type:pdf, Size:1020Kb

JPEG: Currently the Most Important Common File Format Main Reference • Ze-Nian Li and Mark S Drew, Fundamentals of Multimedia, second edition. 2 Chapter Three Graphics and Image Data Representations 3 Content 3-1: Graphics/Image Data Types 3-2: Popular File Formats. 4 Outlines • This chapter introduces: ▪ how best to represent the graphics and image data since it is of crucial importance in the study of multimedia. ▪ Starting with 1-bit images, then 8-bit gray images, then 24- bit color images and 8-bit versions of color images. • The specifics of file formats for storing such images are also discussed. 5 3.1 Graphics/Image Data Types • Table 3.1 shows a list of file formats used in the popular product Adobe Premiere. • We concentrate on GIF and JPG image file formats, since the GIF file format is one of the simplest and contains several fundamental features, • and the JPG file format is arguably the most important overall. 6 3.1 Graphics/Image Data Types 7 3.1.1 1-Bit Images • Images consist of pixels (picture elements in digital images). • A 1-bit image (also called binary image) consists of on and off bits only and thus is the simplest type of image. • Each pixel is stored as a single bit (0 or 1). • It is also sometimes called a 1-bit monochrome (called Lena image by multimedia scientists) image since it contains no color. See Figures in next two slides. • 1-bit images can be satisfactory for pictures containing only simple graphics and text. • Fax machines use 1-bit data, so in fact 1-bit images are still important, even though storage capacities have increased enough to permit the use of imaging that carries more information. 8 3.1.1 1-Bit Images 9 3.1.1 1-Bit Images • A 640 × 480 monochrome image requires 38.4 kilobytes (kB) of storage. • {[(640 × 480)Bits /8] = 38400 Bytes} / 1000 = 38.4 Kilobytes. 10 3.1.2 8-Bit Gray-Level Images • 8-bit image is one for which each pixel has a gray value between 0 and 255. • Each pixel is represented by a single byte - for example, a dark pixel might have a value of 10, and a bright one might be 230. • The entire image can be thought of as a two-dimensional array of pixel values referred to as a bitmap, a representation of the graphics/image data that parallels the manner in which it is stored in video memory. • Image resolution refers to the number of pixels in a digital image (higher resolution always yields better quality but increases size) 11 3.1.2 8-Bit Gray-Level Images 12 3.1.2 8-Bit Gray-Level Images • Fairly high resolution for such an image might be 1,600 × 1,200, whereas lower resolution might be 640 × 480. • Notice that here we are using an aspect ratio of 4:3. • We do not have to adopt this ratio, but it has been found to look natural. • For this reason 4:3 was adopted for early TV (As we will see in Ch5) and most early laptop screens. • Later displays typically use an aspect ratio of 16:9, to match high-definition video and TV. 13 3.1.2 8-Bit Gray-Level Images • Such an array must be stored in hardware; we call this hardware a frame buffer. • Special (relatively expensive) hardware called a “video” card (actually a graphics card) is used for this purpose. • The resolution of the video card does not have to match the desired resolution of the image, but if not enough video card memory is available, the data have to be shifted around in RAM for display. • We can think of the 8-bit image as a set of 1-bit bitplanes, where each plane consists of a 1-bit representation of the image: a bit is turned on if the image pixel has a nonzero value at that bit level. 14 3.1.2 8-Bit Gray-Level Images • Figure 3.2 displays the concept of bitplanes graphically. • Each bitplane can have a value of 0 or 1 at each pixel but, together, all the bitplanes make up a single byte that stores values between 0 and 255 (in this 8-bit situation). 15 3.1.2 8-Bit Gray-Level Images • 640×480 grayscale image requires 300kB of storage. • [(640 × 480) = 38400 Bytes] / 1000 = 307.2 Kilobytes. 16 3.1.4 24-Bit Color Images • In a color 24-bit image, each pixel is represented by three bytes, usually representing RGB. • Since each value is in the range 0–255, this format supports 256×256×256, or a total of 16,777,216, possible combined colors; which increases storage size. • a 640 × 480 24-bit color image would require 921.6 kB of storage. (without any compression applied) • Compression is used to decrease the image size by simply grouping pixels effectively. (chapter 7). 17 3.1.4 24-Bit Color Images • An important point to note is that many 24-bit color images are actually stored as 32-bit images, with the extra byte of data for each pixel storing an α (alpha) value representing special-effect information. • Figure 3.5 shows the image forestfire.bmp, a 24-bit image in Microsoft Windows BMP format (discussed later in the chapter). • Also shown are the grayscale images for just the red, green, and blue channels, for this image. • Taking the byte values 0 .. 255 in each color channel to represent intensity, we can display a gray image for each color separately. 18 3.1.4 24-Bit Color Images 19 3.1.4 24-Bit Color Images 20 3.1.5 Higher Bit-Depth Images • Among image formats that are usually not compressed if possible are ones that • Require maximum faithfulness to the viewed scene for various reasons such as medical liability. • For example, an image of a patient’s liver had better represent the colors red and purple, say, very accurately! • Other image formats recognize that more information about the scene being imaged can be gained by using special cameras that view more than just three colors, i.e., RGB. • Here the idea might be to use invisible light (e.g., infrared, ultraviolet) for security cameras, say, or to produce medical images of skin that can utilize the additional colors to better diagnose skin ailments such as carcinoma. 21 3.1.5 Higher Bit-Depth Images • Another reason for using high bit-depth is in satellite imaging, where extra information can give indication of types of crop growth, etc.: here, the cost of simply lifting the camera into high altitude or into space motivates the idea of obtaining as much information as possible, perhaps even if we cannot as yet make use of all the data. • Such images are called multispectral (more than three colors) or hyperspectral (a great many image planes, say 224 colors for satellite imaging). 22 3.1.6 8-Bit Color Images • If space is a concern (and it almost always is—e.g. we don’t want to fill up our smartphone memory needlessly), reasonably accurate color images can be obtained by quantizing the color information to collapse it. • Color quantizing example: reducing the number of colors required to represent a digital image makes it possible to reduce its file size. • Many systems can utilize color information stored with only 8 bits of information (the so-called 256 colors) in producing a screen image. 23 3.1.6 8-Bit Color Images • Even if a system has the electronics to actually use 24-bit information, backward compatibility demands that we understand 8-bit color image files, as well as their being smaller in size and quite useful. • There are tricks that can be used only for such imagery. • 8-bit color image files use the concept of a lookup table to store color information. • Basically, the image stores not color but just a set of bytes, each of which is an index into a table with three byte values that specify the 24-bit color for a pixel with that lookup table index. 24 3.1.6 8-Bit Color Images • For example, • if exactly 23 pixels have RGB values (45, 200, 91) • then store the value 23 in a three-dimensional array, at the element indexed by the index values [45, 200, 91]. • This data structure is called a color histogram. • color histogram: is a very useful tool for image transformation and manipulation in Image Processing. 25 3.1.6 8-Bit Color Images • Notice that the difference between Fig. 3.5a, the 24-bit image, and Fig. 3.7, the 8-bit image, is reasonably small. Fig. 3.5a, the 24-bit image Fig. 3.7, the 8-bit image 26 3.1.6 8-Bit Color Images • Another example for difference between the 24-bit image, and the 8-bit image. The 24-bit image The 8-bit image 27 3.1.6 8-Bit Color Images • Note the great savings in space for 8-bit images over 24-bit ones: a 640 × 480 8-bit color image requires only 300 kB of storage, compared to 921.6 kB for a color image (again, without any compression applied). 28 3.1.7 Color Lookup Tables • The LUT is often called a palette. • The idea is to store only the index, or code value, for each pixel. • if a pixel stores, say, the value 25 (Figure 3.8), the meaning is to go to row 25 in a color lookup table (LUT). 29 3.1.7 Color Lookup Tables •A Color-picker consists of an array of fairly large blocks of color (or a semi-continuous range of colors) such that a mouse-click will select the color indicated.
Recommended publications
  • Supported Formats (August 2020)
    Oracle Outside In Technology 8.5.5 Supported Formats (August 2020) Archive Version Multimedia Version 7z split archives not supported) AVI (Metadata only) 7z Self Extracting exe (split archives not DICOM (File ID only) supported) LZA Self Extracting Compres Flash (text extraction only) 6.x, 7.x, Lite LZH Compress Flash (File ID only) 9,10 Microsoft Office Binder Real Media (File ID only) Microsoft Cabinet (CAB) 95 – 97 MP3 (ID3 metadata only) RAR 1.5, 2.0, 2.9, MPEG-1 Audio layer 3 V ID3 v1 5.0 (Metadata only) Self-extracting .exe MPEG-1 Audio layer 3 V ID3 v2 (Metadata only) UNIX Compress MPEG-1 Video V 2 (File ID only) UNIX GZip MPEG-1 Video V 3 (File ID only) UNIX tar MPEG-2 Audio (File ID only) Uuencode MPEG-4 (Metadata only) ZIP PKZip MPEG-7 (Metadata only) ZIP WinZip QuickTime (Metadata only) ZIP ZIP64 Windows Media ASF (Metadata only) Database Version Windows Media DVR-MS (Metadata only) DataEase 4.x Windows Media Audio WMA (Metadata only) DBase III, IV, V, X, X1 Windows Media Playlist (File ID only) First Choice DB Through 3.0 Windows Media Video WMV (Metadata only) Framework DB 3.0 WAV (Metadata only) Microsoft Access (text only) 1.0, 2.0, 95 … Other Version 2019 Microsoft Access Report Snapshot (File ID 2000 – 2003 AOL Messenger (File ID only) 7.3 only) Microsoft Works DB for DOS 2.0 Microsoft InfoPath (File ID only) 2007 Microsoft Works DB for Macintosh 2.0 Microsoft Live Messenger (via XML filter) 10.0 Microsoft Works DB for Windows 3.0, 4.0 Microsoft Office Theme files (File ID only) 2007 … 2019 Microsoft Works DB for DOS
    [Show full text]
  • Encapsulated Postscript File Format Specification
    ® Encapsulated PostScript File Format Specification ®® Adobe Developer Support Version 3.0 1 May 1992 Adobe Systems Incorporated Adobe Developer Technologies 345 Park Avenue San Jose, CA 95110 http://partners.adobe.com/ PN LPS5002 Copyright 1985–1988, 1990, 1992 by Adobe Systems Incorporated. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of the publisher. Any software referred to herein is furnished under license and may only be used or copied in accordance with the terms of such license. PostScript is a registered trademark of Adobe Systems Incorporated. All instances of the name PostScript in the text are references to the PostScript language as defined by Adobe Systems Incorpo- rated unless otherwise stated. The name PostScript also is used as a product trademark for Adobe Sys- tems’ implementation of the PostScript language interpreter. Any references to a “PostScript printer,” a “PostScript file,” or a “PostScript driver” refer to printers, files, and driver programs (respectively) which are written in or support the PostScript language. The sentences in this book that use “PostScript language” as an adjective phrase are so constructed to rein- force that the name refers to the standard language definition as set forth by Adobe Systems Incorpo- rated. PostScript, the PostScript logo, Display PostScript, Adobe, the Adobe logo, Adobe Illustrator, Tran- Script, Carta, and Sonata are trademarks of Adobe Systems Incorporated registered in the U.S.A. and other countries. Adobe Garamond and Lithos are trademarks of Adobe Systems Incorporated.
    [Show full text]
  • Gaussplot 8.0.Pdf
    GAUSSplotTM Professional Graphics Aptech Systems, Inc. — Mathematical and Statistical System Information in this document is subject to change without notice and does not represent a commitment on the part of Aptech Systems, Inc. The software described in this document is furnished under a license agreement or nondisclosure agreement. The software may be used or copied only in accordance with the terms of the agreement. The purchaser may make one copy of the software for backup purposes. No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose other than the purchaser’s personal use without the written permission of Aptech Systems, Inc. c Copyright 2005-2006 by Aptech Systems, Inc., Maple Valley, WA. All Rights Reserved. ENCSA Hierarchical Data Format (HDF) Software Library and Utilities Copyright (C) 1988-1998 The Board of Trustees of the University of Illinois. All rights reserved. Contributors include National Center for Supercomputing Applications (NCSA) at the University of Illinois, Fortner Software (Windows and Mac), Unidata Program Center (netCDF), The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip). Bmptopnm, Netpbm Copyright (C) 1992 David W. Sanderson. Dlcompat Copyright (C) 2002 Jorge Acereda, additions and modifications by Peter O’Gorman. Ppmtopict Copyright (C) 1990 Ken Yap. GAUSSplot, GAUSS and GAUSS Engine are trademarks of Aptech Systems, Inc. Tecplot RS, Tecplot, Preplot, Framer and Amtec are registered trademarks or trade- marks of Amtec Engineering, Inc. Encapsulated PostScript, FrameMaker, PageMaker, PostScript, Premier–Adobe Sys- tems, Incorporated. Ghostscript–Aladdin Enterprises. Linotronic, Helvetica, Times– Allied Corporation.
    [Show full text]
  • Openimageio 1.7 Programmer Documentation (In Progress)
    OpenImageIO 1.7 Programmer Documentation (in progress) Editor: Larry Gritz [email protected] Date: 31 Mar 2016 ii The OpenImageIO source code and documentation are: Copyright (c) 2008-2016 Larry Gritz, et al. All Rights Reserved. The code that implements OpenImageIO is licensed under the BSD 3-clause (also some- times known as “new BSD” or “modified BSD”) license: Redistribution and use in source and binary forms, with or without modification, are per- mitted provided that the following conditions are met: • Redistributions of source code must retain the above copyright notice, this list of condi- tions and the following disclaimer. • Redistributions in binary form must reproduce the above copyright notice, this list of con- ditions and the following disclaimer in the documentation and/or other materials provided with the distribution. • Neither the name of the software’s owners nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIB- UTORS ”AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- NESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUD- ING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABIL- ITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    [Show full text]
  • Netpbm Format - Wikipedia, the Free Encyclopedia
    Netpbm format - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Portable_anymap Netpbm format From Wikipedia, the free encyclopedia (Redirected from Portable anymap) The phrase Netpbm format commonly refers to any or all Portable pixmap of the members of a set of closely related graphics formats used and defined by the Netpbm project. The portable Filename .ppm, .pgm, .pbm, pixmap format (PPM), the portable graymap format extension .pnm (PGM) and the portable bitmap format (PBM) are image file formats designed to be easily exchanged between Internet image/x-portable- platforms. They are also sometimes referred to collectively media type pixmap, -graymap, [1] as the portable anymap format (PNM). -bitmap, -anymap all unofficial Developed Jef Poskanzer Contents by 1 History Type of Image file formats 2 File format description format 2.1 PBM example 2.2 PGM example 2.3 PPM example 3 16-bit extensions 4 See also 5 References 6 External links History The PBM format was invented by Jef Poskanzer in the 1980s as a format that allowed monochrome bitmaps to be transmitted within an email message as plain ASCII text, allowing it to survive any changes in text formatting. Poskanzer developed the first library of tools to handle the PBM format, Pbmplus, released in 1988. It mainly contained tools to convert between PBM and other graphics formats. By the end of 1988, Poskanzer had developed the PGM and PPM formats along with their associated tools and added them to Pbmplus. The final release of Pbmplus was December 10, 1991. In 1993, the Netpbm library was developed to replace the unmaintained Pbmplus.
    [Show full text]
  • Data Format Guide
    Data Format Guide Tecplot, Inc. Bellevue, WA 2006 COPYRIGHT NOTICE Tecplot 360TMData Format Guide is for use with Tecplot 360TM 2006. Copyright © 1988-2006 Tecplot, Inc. All rights reserved worldwide. Except for personal use, this manual may not be reproduced, trans- mitted, transcribed, stored in a retrieval system, or translated in any form, in whole or in part, without the express written permission of Tecplot, Inc., 3535 Factoria Blvd., Ste 550, Bellevue, Washington, 98006, U.S.A. The software discussed in this documentation and the documentation itself are furnished under license for utilization and duplication only according to the license terms. The copyright for the software is held by Tecplot, Inc. Documentation is provided for information only. It is subject to change without notice. It should not be interpreted as a commitment by Tecplot, Inc. Tecplot, Inc. assumes no liabil- ity or responsibility for documentation errors or inaccuracies. Tecplot, Inc PO Box 52708 Bellevue, WA 98015-2708 U.S.A. Tel: 1.800.763.7005 (within the U.S. or Canada), 00 1 (425)653-1200 (internationally) email: [email protected], [email protected] Questions, comments or concerns regarding this documentation: [email protected] For more information, visit http://www.tecplot.com THIRD PARTY SOFTWARE COPYRIGHT NOTICES ENCSA Hierarchical Data Format (HDF) Software Library and Utilities © 1988-1998 The Board of Trustees of the University of Illi- nois. All rights reserved. Contributors include National Center for Supercomputing Applications (NCSA) at the University of Illinois, Fortner Software (Windows and Mac), Unidata Program Center (netCDF), The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip).
    [Show full text]
  • Image File Formats, Digital Archival and TI/A
    Image File Formats, Digital Archival and TI/A Peter Fornaro & Lukas Rosenthaler A Short Introduction into Image File Formats 1 1 Introduction In general, long-term archival of digital data is a difficult task. On one hand the media, where the digital data is recorded on may be instable and decay with time. On the other hand, the rapid evolution cycle of digital technologies which is measured in years or even months leads to the obsolescence of recording technologies at a fast pace. Old1 data carriers may not be read anymore because the necessary machinery (tape reader, disk interface etc.) is no longer commercially available. Also, the the information about the file formats – that is the information about the meaning of the bits – may be lost because new formats have become standard. Thus, digital archiving is basically the task of guaranteeing the meaningful reading and decoding of bits in the far future. This task can be divided into parts: Bitstream preservation It has to be guaranteed that the bits which are basically analogue symbols on a analogue medium2 can be correctly detected. Since most often the permanence of the bits is higher than the lifetime of a given recording technology, bitstream preservation is basically limited by the obsolescence of a given recording technologies. Thus, copying the bits onto a new data carrier using the latest technology just before a recording technology becomes obsolete will preserve the bitstream. This task called bitstream migration has to be repeated every 3 - 5 years. Since a bitstream can be copied without information loss and the copies will be identical to the “original”, this process can be repeated an indefinite number of times (contrary to analogue copies where each generation is affected by more degradation until all information is lost).
    [Show full text]
  • FILE FORMATS Darry D
    WordPerfect FILE FORMATS Darry D In WordPerfect, when you select File > Open, you are taken to “My Documents.” However, that does not mean that you can open all the files that are stored there. Here are the programs that can open a file, based upon its file extension. A file extension is a string of characters beginning with a period and followed by one to three letters; the optional second part of a PC computer filename; “most applications provide extensions for the files they create”; for example, WordPerfect uses the file extension “wpd”. o .cgm — CGM (Computer Graphics Metafile) was a once-standard for- mat for interchanging graphics images. CGM stores images primarily in vector graphics, but also provides a raster format. Earlier GDM and VDM formats have been merged into CGM. There are many non-standard varieties of CGM in use. Usually found in the “My Pictures” folder of “My Documents” or some other graphics folder (such as “Art”), it can be inserted into WordPerfect 9 using Insert > Graphics > From File (from the MenuBar). o .cvs — comma-delimited file (a database with items separated by commas); this one can be opened only by importing it into the Outlook Express Address Book. o .doc — Created with MS Word; WordPerfect can open it. o .eml — Email created by Outlook Express or Outlook either of which can open it. Http://DarryD.com (5 November 2020) Page 1 of 4 WORDPERFECT 5 NOVEMBER 2020 o .htm —. It is the file extension of HTML, created by programs like Microsoft FrontPage and others, including WordPerfect.
    [Show full text]
  • TP1 Image File Manipulation
    M1Mosig Introduction to Visual Computing TP1 Image File Manipulation The objective of this practical work is to implement basic image manipu- lation tools, e.g. read, write and convert. To this aim, and without loss of generality, the simple image file formats PBM (Portable Map) will be consid- ered. 1 "Portable Map" image file formats The netpbm file formats PBM, PGM and PPM are respectively: portable bitmap, portable grayscalemap and portable pixmap (also called PNM for portable anymap). They were originally designed in the early 80’s to ease image exchange between platforms. They offer a simple and pedagogical solution to develop image manipulation tools. In these formats, an image is a matrix of pixels where values represent the illumination in each pixel: white and black (PBM), grayscale (PGM) or 3 values RGB (PPM). Definition The PNM file content is as follows: 1. A ’magic number’ that identifies the file type. A pbm image’s magic number is the two characters ’P1’ (ASCII) or ’P4’ (binary). 2. Whitespace (blanks, TABs, CRs, LFs). 3. The width and height (separated with a whitespace) in pixels of the image, formatted as ASCII characters in decimal. 4. Only for PGM and PPM: The maximum intensity value between 0 and 255, again in ASCII decimal, followed by a whitespace. 5. Width × Height numbers. Those numbers are either decimal values coded in ASCII et separated by a whitespace for the formats P1, P2, P3, or directly binary values (usually 1 byte) in the case of P4, P5, P6. In the latter case, there is no whitespace between values.
    [Show full text]
  • Image Formats
    Image Formats Ioannis Rekleitis Many different file formats • JPEG/JFIF • Exif • JPEG 2000 • BMP • GIF • WebP • PNG • HDR raster formats • TIFF • HEIF • PPM, PGM, PBM, • BAT and PNM • BPG CSCE 590: Introduction to Image Processing https://en.wikipedia.org/wiki/Image_file_formats 2 Many different file formats • JPEG/JFIF (Joint Photographic Experts Group) is a lossy compression method; JPEG- compressed images are usually stored in the JFIF (JPEG File Interchange Format) >ile format. The JPEG/JFIF >ilename extension is JPG or JPEG. Nearly every digital camera can save images in the JPEG/JFIF format, which supports eight-bit grayscale images and 24-bit color images (eight bits each for red, green, and blue). JPEG applies lossy compression to images, which can result in a signi>icant reduction of the >ile size. Applications can determine the degree of compression to apply, and the amount of compression affects the visual quality of the result. When not too great, the compression does not noticeably affect or detract from the image's quality, but JPEG iles suffer generational degradation when repeatedly edited and saved. (JPEG also provides lossless image storage, but the lossless version is not widely supported.) • JPEG 2000 is a compression standard enabling both lossless and lossy storage. The compression methods used are different from the ones in standard JFIF/JPEG; they improve quality and compression ratios, but also require more computational power to process. JPEG 2000 also adds features that are missing in JPEG. It is not nearly as common as JPEG, but it is used currently in professional movie editing and distribution (some digital cinemas, for example, use JPEG 2000 for individual movie frames).
    [Show full text]
  • Windows Metafiles
    Windows Metafiles An Analysis of the EMF Attack Surface & Recent Vulnerabilities Mateusz “j00ru” Jurczyk Ruxcon, Melbourne 2016 PS> whoami • Project Zero @ Google • Low-level security researcher with interest in all sorts of vulnerability research and software exploitation • http://j00ru.vexillium.org/ • @j00ru Agenda • Windows Metafile primer, GDI design, attack vectors. • Hacking: • Internet Explorer (GDI) • Windows Kernel (ATMFD.DLL) • Microsoft Office (GDI+) • VMware virtualization (Print Spooling) • Final thoughts. Windows GDI & Metafile primer Windows GDI • GDI stands for Graphics Device Interface. • Enables user-mode applications to use graphics and formatted text on video displays and printers. • Major part of the system API (nearly 300 documented functions). • Present in the OS since the very beginning (Windows 1.0 released in 1985). • One of the oldest subsystems, with most of its original code still running 31 years later. • Concidentally (?) also one of the most buggy components. How to draw 1. Grab a handle to a Device Context (HDC). • Identifies a persistent container of various graphical settings (pens, brushes, palettes etc.). • Can be used to draw to a screen (most typically), a printer, or a metafile. • Most trivial example: HDC hdc = GetDC(NULL); (obtains a HDC for the entire screen) How to draw 2. Use a drawing function. Ellipse(hdc, 100, 100, 500, 300); RoundRect(hdc, 100, 100, 500, 500, 100, 100); Windows GDI – simplified architecture NT OS Kernel Display Drivers Printer Drivers Font Drivers Kernel-mode GDI (win32k.sys) ring-0 ring-3 User-mode GDI (gdi32.dll) GDI+ (gdiplus.dll) app1.exe app2.exe app3.exe app4.exe User to kernel API mappings Most user-mode GDI functions have their direct counterparts in the kernel: GDI32.DLL win32k.sys AbortDoc NtGdiAbortDoc AbortPath NtGdiAbortPath AddFontMemResourceEx NtGdiAddFontMemResourceEx AddFontResourceW NtGdiAddFontResourceW AlphaBlend NtGdiAlphaBlend ..
    [Show full text]
  • About Graphics/Digital Images
    About Graphics/Digital Images Digital images are found in lots of file formats (types) that are used for various reasons. I liken the file formats to flavors of ice-cream, which you might or might not choose to consume on any given day. One day chocolate is more important than mint; another day you might use vanilla, and on another day you might decide to combine more than one flavor in the same bowl. Likewise, you might choose one type of graphic file for a particular project, but it might be completely inappropriate for another project. What works well for display purposes (keeping it on the computer, or for publication to the internet) might not print well. Something that prints well might be too big a file to post to the internet, or may make your program run too slowly. Also, some authoring programs (like Boardmaker or Classroom Suite) might be written to only understand certain types of image files. Some file types are more common than others, and are more likely to be recognized by the “parent” program (the one you use to display, edit or print your image). Whatever type you pick ultimately depends on how you plan to use the image. The more technical definitions provided below are taken from the glossary found at http://www.photoshopelementsuser.com/glossary.php?letter=B The additional comments I have added, and hopefully let you know why you would care about any of this, anyway. The two biggest types of images I describe here fall loosely into two categories: vector images and bitmap images.
    [Show full text]