joppuyo / acf-image-aspect-ratio-crop

Image Aspect Ratio Crop field for Advanced Custom Fields
https://wordpress.org/plugins/acf-image-aspect-ratio-crop/
GNU General Public License v2.0
106 stars 16 forks source link

Huge image gets corrupted #136

Closed aceArt-GmbH closed 9 months ago

aceArt-GmbH commented 9 months ago

Hey, thanks for maintaining this plugin :)

We are currently facing an issue with the cropping of huge images. When editing a huge image (22MB 25192 x 14175px) and cropping to a somewhat big size the resulting image is black & white and not the selected area

Input image https://hff-screenings.de/wp-content/uploads/2024/02/Stimmungsbild_whereweusedtosleep.png Output image https://hff-screenings.de/wp-content/uploads/2024/02/Stimmungsbild_whereweusedtosleep-aspect-ratio-2524-1420.png

Cropping the image to a very small part of the original seems to work just fine.

(Aspect ratio 2506x3402)

Debug log does not print anything. Do you have any idea what the problem might be?

Version 6.0.3 Wordpress 6.4.3 PHP 8.3.3 ImageMagick 6.9.11

joppuyo commented 9 months ago

Hello! It's very likely that the issue is not with this plugin: it simply uses the underlying image editing functionality that WordPress provides. Because the image is so large, the ImageMagick or GD library WordPress uses might be running out of memory which corrupts the image. I recommend uploading a smaller version of the image to prevent this issue from happening.

aceArt-GmbH commented 9 months ago

I'd still like to know which part is failing, but you are right. It's probably not a problem with this extension.

Thanks for your input on this