Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FEATURE REQUEST Stretch / scale image to fit display on with or height
#1
Hello, and thanks for all your great work! 

Would it be possible to add a function to scale an image so it fits the display size on the width or height?

There is no module currently for micropython that makes it possible to resize images. Your build of micropython comes close however. 

I think such an addition would be very useful! 

Thanks in advance and regards.
Reply
#2
Image resizing is only possible by the 2^N factor.
I would recommend to create the image with the display dimensions size, than you can scale it down by 2, 4, 8 ...

I have no plans to implement image resizing by arbitrary factor at the moment.
Reply
#3
Thanks for your reply! 

I am building a upnp control point to display which music album is playing on my renderer, ie meta information about the track and album cover. So I don't have control over the image size. I just an image from a certain Location that need to be resize accordingly. This is why I would need the capacity to scale the incoming image.
Reply
#4
The best I could do at the moment is to implement the auto scale factor which would ensure that the whole image is visible on the screen (or the current window) if it is larger than the screen/window dimensions.
Reply
#5
Thanks lobo, that would be a great feature! Cheers
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)