-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image scaling error #185
Comments
I tried some things, and actually two options were not working as described! I think that removing the 2 lines:
in the function Is it worth trying to refactor into makeFullframe to try to save a convert or two - or should I just do the simple PR with this? it does seem to me that it would make sense to have the image processing unified, and then keep the display module just about displaying. That would make it simpler to add more image processing options over time. |
The trick with the It might make more sense to tell So I don't think we can avoid that convert call since it also deals with pixel data for the display, and baking this into makeFullframe is bad since the output from that function is (I believe) to some extent cached and reused, which means we cannot have hardware based data there (except for the resolution) since it will make it difficult to deal with later should user change any settings (trying to be smart about fetching data from google since they have limits for how hard you can ping them). But I'm more than open to a PR which investigates the change of resize to canvas instead. |
Correction, I doublechecked and the only change done before caching is rotating it to the orientation it SHOULD have according to EXIF data. My bad, been a while since I looked at the code. And yes, what you're saying and showing looks absolutely correct, please do a PR, also please use this change for 2 days and let me know if you've seen any odd behaviors before I merge it :) Thanks 😄 |
Looks like this broke the resizing of portrait orientation images larger than the monitors resolution. Our frame is setup to "do nothing" (don't care for the blur or fill). Previously, the displayed result of resizing was blank-space on either side of the resized large portrait image (complete image displayed with blank space on either side). After the update (?), the resulting images are zoomed in. Thanks for this project, we love our picture frame zoomed in or not. |
I had the same question (see the text just below the motorcycle picture) but came away thinking this is how mrworf intended it to work. |
--snip Yes. This is how the resize worked previously. Panoramas etc. displayed resized to fit the horizontal dimension of the frame (monitor) with black above and below; skinny portraits filled the vertical dimension with black space on either side. "Do Nothing" is working correctly: images are displayed "as-is" with no resizing, resulting in the zoomed-in effect for images that exceed the dimensions of the screen, and zoomed out as in the motorcycle image. If I had my druthers, the "Blur" choice would be replaced with "Resize with Blur", and, "Resize without Blur". The resize is what I want, the Blur is what I'd like to unselect. Thanks again, |
So we're missing an option here then :)
Does this sound about right? So the option missing here is "zoom to fit" |
That's my understanding, but @PhilWareAR can confirm. |
I've been trying all the options in the python3 branch, and came across something I thought was amiss in how the software handles images which don't fill the screen. There are 4 options, and 3 work fine, but do nothing does not work like I think it was meant to. When do nothing is selected, the image is still scaled to fit the screen. I "think" it is meant to scale down if necessary, but if not, then there should be a small image centered in the screen. Looking through the logic,
modules/helper.py:makeFullframe()
seems to ignore properly, and scale everything else to what it should be. Then the image gets handed back and eventually winds up inmodules/display.py:image()
where I think that each and every image goes throughconvert
again and is scaled to the screen. (Although I'm not sure I follow all the functions withconvert
in the display module. What are the x and y offsets for? Is it compensating for rotation?) It would be my suggestion that a case be added tomakeFullframe()
to scale down do-nothing when needed and pad the image if not - and then determine whether we can remove the scaling inimage()
. I think that the net result will be to callconvert
one less time, and to behave properly. It would also be possible to do a mat frame for small photos (e.g.add beveled edges)? In any case, I wanted to make sure that I understood all this correctly, to get some input on the offsets in display.py, and ask if making such a change made sense to others as well?The text was updated successfully, but these errors were encountered: