-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Images being stretched #2
Comments
Ok, I managed to find out what's wrong with the output images. The image height is correct, it's 650px in the example, but the actual stretched height is equal to the width: 1440px. I stretched the original image in Photoshop and the circle is exactly the same. So it seems like the script always does the "square" cropping but seems to output the correct image size. Maybe it's this line: https://github.com/flokosiol/kirby-focus/blob/master/focus.php#L29 |
I will have a look at this, thanks for reporting.
or with two arguments like this
I guess I have to test some more edge cases (thumb height and/or width bigger than original, …) |
I tried both. If I crop a 200x200 square by Can you please test the images I uploaded in the first post in your installation? Maybe it's something else. It stretches almost every image in my installations, with almost every crop ratio. If the image doesn't contain a circle or text it's not immediately noticeable, though. |
I think I found the problem, but I will do some more testing. If you can't wait for so long, you could you change this line …
… to this …
Regards, |
Wow, thank you for the fast solution! ❤️ |
Some image ratios seem to be stretched.
Input images:
2800 x 1300
1766 x 1300
1300 x 1300
869 x 1300
Output images with 1440x650:
Original: 2800 x 1300
Original: 1766 x 1300
Original: 1300 x 1300
Original: 869 x 1300
Can you reproduce this with the images or is my configuration wrong?
It seems like only square input images are cropped correctly.
Maybe it has something to do with these lines, but I can't figure it out: https://github.com/flokosiol/kirby-focus/blob/master/focus.php#L88-L126
The text was updated successfully, but these errors were encountered: