mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Avoid resize operation if image is already the correct size
This commit is contained in:
		
							parent
							
								
									9cde0aa7d6
								
							
						
					
					
						commit
						255a090e97
					
				| 
						 | 
					@ -1514,6 +1514,9 @@ class Image:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.load()
 | 
					        self.load()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if self.size == size:
 | 
				
			||||||
 | 
					            return self._new(self.im)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if self.mode in ("1", "P"):
 | 
					        if self.mode in ("1", "P"):
 | 
				
			||||||
            resample = NEAREST
 | 
					            resample = NEAREST
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user