hooglreport.blogg.se

Hsamp and vsamp for jpeg 420
Hsamp and vsamp for jpeg 420








hsamp and vsamp for jpeg 420

info = s # FIXME: value will change elif marker = 0xFFE2 and s = b "FPXR \0 " : # extract FlashPix information (incomplete) self. info = jfif_density elif marker = 0xFFE1 and s = b "Exif \0 " : # extract Exif information (incomplete) self. info = divmod ( version, 256 ) # extract JFIF properties try : jfif_unit = i8 ( s ) jfif_density = i16 ( s, 8 ), i16 ( s, 10 ) except : pass else : if jfif_unit = 1 : self. info = version = i16 ( s, 5 ) # version self. append (( app, s )) if marker = 0xFFE0 and s = b "JFIF" : # extract JFIF information self. fp, n ) app = "APP %d " % ( marker & 15 ) self. # Also look for well-known application markers. def APP ( self, marker ): # Application marker. # import array import struct import io import warnings from struct import unpack_from from PIL import Image, ImageFile, TiffImagePlugin, _binary from PIL.JpegPresets import presets from PIL._util import isStringType i8 = _binary. # See the README file for information on usage and redistribution. # Copyright (c) 1995-1996 by Fredrik Lundh. # Copyright (c) 1997-2003 by Secret Labs AB.

#Hsamp and vsamp for jpeg 420 full#

# $Id$ # JPEG (JFIF) file handling # See "Digital Compression and Coding of Continuous-Tone Still Images, # Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1) # History: # fl Created # fl Added full parser # fl Added hack to use the IJG command line utilities # fl Workaround Photoshop 2.5 CMYK polarity bug # fl Added draft support, JFIF version (0.1) # fl Added encoder options, added progression property (0.2) # fl Save mode 1 images as BW (0.3) # fl Added YCbCr to draft and save methods (0.4) # fl Don't hang on files using 16-bit DQT's (0.4.1) # fl Extract DPI settings from JFIF files (0.4.2) # fl Skip pad bytes before markers identify Exif files (0.4.3) # fl Added experimental EXIF decoder (0.5) # fl Added experimental EXIF GPSinfo decoder # fl Extract COM markers # fl Added icc_profile support (from Florian Hoech) # fl Changed CMYK handling always use Adobe polarity (0.6) # fl Added subsampling support (from Justin Huff).










Hsamp and vsamp for jpeg 420