Fix typos in jpeg code

This commit is contained in:
Guido van Rossum 1993-02-25 00:17:22 +00:00
parent 83c81448b1
commit be6d77a9b8
1 changed files with 4 additions and 4 deletions

View File

@ -21,14 +21,14 @@ def rgb2jpeg(img, x, y):
def jpeggrey2grey(img, width, height):
import jpeg
data, width, height, bytesperpixel = jpeg.decompress(data)
data, width, height, bytesperpixel = jpeg.decompress(img)
if bytesperpixel <> 1: raise RuntimeError, 'not grayscale jpeg'
return data
def jpeg2rgb(img, width, height):
import cl, CL
import jpeg
data, width, height, bytesperpixel = jpeg.decompress(data)
data, width, height, bytesperpixel = jpeg.decompress(img)
if bytesperpixel <> 4: raise RuntimeError, 'not rgb jpeg'
return data
@ -44,9 +44,9 @@ converters = [ \
('rgb', 'grey', imageop.rgb2grey, LOSSY), \
('grey', 'rgb', imageop.grey2rgb, NOT_LOSSY), \
('jpeggrey','grey',jpeggrey2grey, NOT_LOSSY), \
('grey', 'jpeggrey',grey2jpeggrey, NOT_LOSSY), \
('grey', 'jpeggrey',grey2jpeggrey, LOSSY), \
('jpeg', 'rgb', jpeg2rgb, NOT_LOSSY), \
('rgb', 'jpeg', rgb2jpeg, NOT_LOSSY), \
('rgb', 'jpeg', rgb2jpeg, LOSSY), \
]
built = {}