diff --git a/hydrus/core/HydrusPSDHandling.py b/hydrus/core/HydrusPSDHandling.py index 4594aea30..e0762dac4 100644 --- a/hydrus/core/HydrusPSDHandling.py +++ b/hydrus/core/HydrusPSDHandling.py @@ -44,14 +44,13 @@ def GenerateThumbnailNumPyFromPSDPath( path: str, target_resolution: typing.Tupl if clip_rect is not None: pil_image = HydrusImageHandling.ClipPILImage( pil_image, clip_rect ) + + pil_image = HydrusImageHandling.DequantizePILImage( pil_image ) - thumbnail_pil_image = pil_image.resize( target_resolution, PILImage.LANCZOS ) numpy_image = HydrusImageHandling.GenerateNumPyImageFromPILImage(thumbnail_pil_image) - numpy_image = HydrusImageHandling.DequantizeNumPyImage( numpy_image ) - return numpy_image