mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	
						commit
						bcd3551f51
					
				| 
						 | 
				
			
			@ -428,8 +428,7 @@ class ImageFileDirectory(collections.MutableMapping):
 | 
			
		|||
 | 
			
		||||
            ifd = fp.read(12)
 | 
			
		||||
            if len(ifd) != 12:
 | 
			
		||||
                warnings.warn("Possibly corrupt EXIF data.  "
 | 
			
		||||
                              "Expecting to read 12 bytes but only got %d."
 | 
			
		||||
                warnings.warn("Possibly corrupt EXIF data. Expecting to read 12 bytes but only got %d."
 | 
			
		||||
                              % (len(ifd)))
 | 
			
		||||
                continue
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -467,9 +466,8 @@ class ImageFileDirectory(collections.MutableMapping):
 | 
			
		|||
                data = ifd[8:8+size]
 | 
			
		||||
 | 
			
		||||
            if len(data) != size:
 | 
			
		||||
                warnings.warn("Possibly corrupt EXIF data.  "
 | 
			
		||||
                              "Expecting to read %d bytes but only got %d. "
 | 
			
		||||
                              "Skipping tag %s" % (size, len(data), tag))
 | 
			
		||||
                warnings.warn("Possibly corrupt EXIF data. Expecting to read %d bytes but only got %d. Skipping tag %s"
 | 
			
		||||
                              % (size, len(data), tag))
 | 
			
		||||
                continue
 | 
			
		||||
 | 
			
		||||
            self.tagdata[tag] = data
 | 
			
		||||
| 
						 | 
				
			
			@ -484,8 +482,7 @@ class ImageFileDirectory(collections.MutableMapping):
 | 
			
		|||
 | 
			
		||||
        ifd = fp.read(4)
 | 
			
		||||
        if len(ifd) != 4:
 | 
			
		||||
            warnings.warn("Possibly corrupt EXIF data.  "
 | 
			
		||||
                          "Expecting to read 4 bytes but only got %d."
 | 
			
		||||
            warnings.warn("Possibly corrupt EXIF data. Expecting to read 4 bytes but only got %d."
 | 
			
		||||
                          % (len(ifd)))
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -704,9 +701,8 @@ class TiffImageFile(ImageFile.ImageFile):
 | 
			
		|||
            if not self.__next:
 | 
			
		||||
                raise EOFError("no more images in TIFF file")
 | 
			
		||||
            if DEBUG:
 | 
			
		||||
                print("Seeking to frame %s, on frame %s, "
 | 
			
		||||
                      "__next %s, location: %s" %
 | 
			
		||||
                      (frame, self.__frame, self.__next, self.fp.tell()))
 | 
			
		||||
                print("Seeking to frame %s, on frame %s, __next %s, location: %s"
 | 
			
		||||
                      % (frame, self.__frame, self.__next, self.fp.tell()))
 | 
			
		||||
            # reset python3 buffered io handle in case fp
 | 
			
		||||
            # was passed to libtiff, invalidating the buffer
 | 
			
		||||
            self.fp.tell()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,10 +75,8 @@ def install():
 | 
			
		|||
            pool = Pool(2)
 | 
			
		||||
            CCompiler.compile = _mp_compile
 | 
			
		||||
        except Exception as msg:
 | 
			
		||||
            print("Exception installing mp_compile, proceeding without:"
 | 
			
		||||
                  "%s" % msg)
 | 
			
		||||
            print("Exception installing mp_compile, proceeding without: %s" % msg)
 | 
			
		||||
    else:
 | 
			
		||||
        print("Single threaded build, not installing mp_compile:"
 | 
			
		||||
              "%s processes" % MAX_PROCS)
 | 
			
		||||
        print("Single threaded build, not installing mp_compile: %s processes" % MAX_PROCS)
 | 
			
		||||
 | 
			
		||||
install()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user