• Resolved commparlimage

    (@commparlimage)


    I don’t know why it does this, but it only seems to occur with sRGB images.

    When I try to crop them with the field, it takes my original image and turns it into a 1×1 pixel white image.

    If I re-save the image in photoshop, it works fine. (The image is now only RGB)

    This site is running on an old PHP version, but I try for a few seconds running the field on PHP 7.0+ and had the same bug. The only thing I was able to conclude is that if affects sRGB images. Mostly images taken by phones, which my customer will always do.

    Some images didn’t turn into a 1×1 white square, but they were returned uncropped. (They were sRGB too).

    I’m in over my head with this bug, some help would be appreciated!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author joppuyo

    (@joppuyo)

    Could you try to built in image cropping in WordPress and see if you can reproduce this issue?

    https://www.wpbeginner.com/beginners-guide/how-to-crop-rotate-scale-and-flip-images-in-wordpress/

    Thread Starter commparlimage

    (@commparlimage)

    Thanks for your quick answer Joppuyo.

    Tried and it doesn’t reproduce the issue.

    The issue only occurs with sRGB image and the ACF : Image Aspect Ratio Crop plugin.

    Other images are passing through the plugin just fine. (Normal RGB images)

    Plugin Author joppuyo

    (@joppuyo)

    Ok, that sounds pretty weird. Can you post a few things to help me debug this:

    * WordPress version
    * ACF version
    * Version of this plugin
    * Image editor details
    * List of plugins

    You can find the list of plugins by selecting Tools -> Site Health -> Info -> Active plugins.

    You can find the image editor details by selecting Tools -> Site Health -> Info -> Media handling.

    If you could also email me one of the photos that are causing problems, my email address is [email protected]

    Thanks!

    Thread Starter commparlimage

    (@commparlimage)

    WordPress version: 5.5.1
    ACF Version: 5.9.1
    This plugin: 4.0.5

    Image editor details:

    éditeur actif WP_Image_Editor_Imagick
    Numéro de version ImageMagick 1802
    Cha?ne de version ImageMagick ImageMagick 7.0.10-10 Q16 x86_64 2020-07-09 https://imagemagick.org
    Téléversements de fichiers Activé
    Taille maximale autorisée pour les données des publications 256M
    Taille maximale des fichiers téléversés 256M
    Taille de fichier effective maximale. 256 Mo
    Nombre maximal de fichiers autorisés. 20
    Limites de ressources Imagick

    area: 31 Go
    disk: 9.2233720368548E+18
    file: 12288
    map: 31 Go
    memory: 16 Go
    thread: 1

    Version de GD bundled (2.1.0 compatible)
    Version de Ghostscript 9.25

    Total list of plugins:

    – Advanced Custom Fields Multilingual
    – Advanced Custom Fields PRO
    – Advanced Custom Fields: Image Aspect Ratio Crop
    – Duplicate Post Page Menu & Custom Post Type
    – UpdraftPlus
    – WP Fastest Cache
    – WPML Media
    – WPML Multilingual CMS
    – WPML String Translation
    – WPML Translation Management

    Will email the picture at this instant! Thanks a lot!

    Thread Starter commparlimage

    (@commparlimage)

    Hi joppuyo!

    Did you have time to test? Were you able to reproduce the issue?

    Plugin Author joppuyo

    (@joppuyo)

    Hey, I had some time to test this and managed to reproduce the issue.

    It seems like there could be an issue with the image orientation, the image you posted has EXIF tag Orientation: RightTop. WordPress 5.3 was supposed to fix this but I think there might be some issue where wrong dimensions are used in some cases.

    But since I can now reproduce this issue I should be able to fix this.

    • This reply was modified 4 years, 1 month ago by joppuyo.
    • This reply was modified 4 years, 1 month ago by joppuyo.
    • This reply was modified 4 years, 1 month ago by joppuyo.
    Plugin Author joppuyo

    (@joppuyo)

    Maybe WordPress rotates the scaled version of the image and since this plugin accesses the original un-rotated version of the image and which means the coordinates are wrong?

    I’ll have to see if it’s possible to take the rotation into account while cropping.

    Thread Starter commparlimage

    (@commparlimage)

    Awesome, thanks man!

    Will be waiting on your answer!

    You did get a 1×1 white image as a result?

    Plugin Author joppuyo

    (@joppuyo)

    Hey, I just released version 4.0.6 which should fix this problem.

    Could you test if you can still reproduce the issue?

    You did get a 1×1 white image as a result?

    I got a black image instead of a white image but I think it was caused by the same issue.

    Thread Starter commparlimage

    (@commparlimage)

    I have to say a big thank you!! It fixed the problem!

    Thanks for your time!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘sRGB image turned into 1×1 white image’ is closed to new replies.