mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Merge pull request #15 from sfllaw/master
Backport fix to split() after open() (regression in 1.1.7).
This commit is contained in:
		
						commit
						73b4a6b0b0
					
				| 
						 | 
					@ -1494,11 +1494,11 @@ class Image:
 | 
				
			||||||
    def split(self):
 | 
					    def split(self):
 | 
				
			||||||
        "Split image into bands"
 | 
					        "Split image into bands"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.load()
 | 
				
			||||||
        if self.im.bands == 1:
 | 
					        if self.im.bands == 1:
 | 
				
			||||||
            ims = [self.copy()]
 | 
					            ims = [self.copy()]
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            ims = []
 | 
					            ims = []
 | 
				
			||||||
            self.load()
 | 
					 | 
				
			||||||
            for i in range(self.im.bands):
 | 
					            for i in range(self.im.bands):
 | 
				
			||||||
                ims.append(self._new(self.im.getband(i)))
 | 
					                ims.append(self._new(self.im.getband(i)))
 | 
				
			||||||
        return tuple(ims)
 | 
					        return tuple(ims)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user