Merge pull request #2873 from radarhere/debugging

Removed debugging code
This commit is contained in:
wiredfool 2017-12-19 15:52:49 +00:00 committed by GitHub
commit d42b57cf1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 20 deletions

View File

@ -225,15 +225,12 @@ SAVE = {
}
def _save(im, fp, filename, check=0):
def _save(im, fp, filename):
try:
rawmode, bits, colors = SAVE[im.mode]
except KeyError:
raise IOError("cannot write mode %s as BMP" % im.mode)
if check:
return check
info = im.encoderinfo
dpi = info.get("dpi", (96, 96))

View File

@ -314,7 +314,7 @@ SAVE = {
}
def _save(im, fp, filename, check=0):
def _save(im, fp, filename):
try:
image_type, rawmode = SAVE[im.mode]
@ -323,9 +323,6 @@ def _save(im, fp, filename, check=0):
frames = im.encoderinfo.get("frames", 1)
if check:
return check
fp.write(("Image type: %s image\r\n" % image_type).encode('ascii'))
if filename:
fp.write(("Name: %s\r\n" % filename).encode('ascii'))

View File

@ -116,7 +116,7 @@ _COMPRESSION_TYPES = {
##
# (Internal) Image save plugin for the Palm format.
def _save(im, fp, filename, check=0):
def _save(im, fp, filename):
if im.mode == "P":
@ -165,9 +165,6 @@ def _save(im, fp, filename, check=0):
raise IOError("cannot write mode %s as Palm" % im.mode)
if check:
return check
#
# make sure image data is available
im.load()

View File

@ -119,16 +119,13 @@ SAVE = {
}
def _save(im, fp, filename, check=0):
def _save(im, fp, filename):
try:
version, bits, planes, rawmode = SAVE[im.mode]
except KeyError:
raise ValueError("Cannot save %s images as PCX" % im.mode)
if check:
return check
# bytes per plane
stride = (im.size[0] * bits + 7) // 8
# stride should be even

View File

@ -664,7 +664,7 @@ class _idat(object):
self.chunk(self.fp, b"IDAT", data)
def _save(im, fp, filename, chunk=putchunk, check=0):
def _save(im, fp, filename, chunk=putchunk):
# save an image to disk (called by the save method)
mode = im.mode
@ -706,9 +706,6 @@ def _save(im, fp, filename, chunk=putchunk, check=0):
except KeyError:
raise IOError("cannot write mode %s as PNG" % mode)
if check:
return check
#
# write minimal PNG file