mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Merge pull request #2873 from radarhere/debugging
Removed debugging code
This commit is contained in:
		
						commit
						d42b57cf1e
					
				| 
						 | 
				
			
			@ -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))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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'))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user