mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	
						commit
						82c29f65d3
					
				| 
						 | 
				
			
			@ -2327,6 +2327,7 @@ def open(fp, mode="r"):
 | 
			
		|||
#
 | 
			
		||||
# Image processing.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def alpha_composite(im1, im2):
 | 
			
		||||
    """
 | 
			
		||||
    Alpha composite im2 over im1.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -551,7 +551,7 @@ class ImageFileDirectory(collections.MutableMapping):
 | 
			
		|||
                # NUL (binary zero). Also, I don't think this was well
 | 
			
		||||
                # exercised before.
 | 
			
		||||
                if sys.version_info[0] == 2:
 | 
			
		||||
                    value = value.decode('ascii','replace')
 | 
			
		||||
                    value = value.decode('ascii', 'replace')
 | 
			
		||||
                data = value = b"" + value.encode('ascii', 'replace') + b"\0"
 | 
			
		||||
            else:
 | 
			
		||||
                # integer data
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,7 +54,7 @@ def _mp_compile(self, sources, output_dir=None, macros=None,
 | 
			
		|||
 | 
			
		||||
def install():
 | 
			
		||||
 | 
			
		||||
    fl_pypy3 = hasattr(sys, 'pypy_version_info') and sys.version_info > (3,0)
 | 
			
		||||
    fl_pypy3 = hasattr(sys, 'pypy_version_info') and sys.version_info > (3, 0)
 | 
			
		||||
    fl_win = sys.platform.startswith('win')
 | 
			
		||||
 | 
			
		||||
    if fl_pypy3:
 | 
			
		||||
| 
						 | 
				
			
			@ -75,9 +75,10 @@ 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