txoof / epdlib

Python library for creating and writing modular layouts for e-paper screens
GNU General Public License v3.0
16 stars 8 forks source link

ImageBlock appears inappropriately resizes images #22

Closed txoof closed 8 months ago

txoof commented 2 years ago

Class ImageBlock()

            if max(im.size) > min(self.padded_area):
                logging.debug(f'resizing image to fit area: {self.padded_area}')
#                 max_size = min(self.padded_area)
#                 resize = [max_size, max_size]
                im.thumbnail(self.padded_area, Image.BICUBIC)
                logging.debug(f'new image size: {im.size}')

Unclear what the issue is, but this does not appear to be working as expected and images are sometimes resized to a much smaller size..

txoof commented 2 years ago

This is actually due to a problem related to image types that have transparent/alpha channel.