Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    No, not currently. Not even sure why you would want to, perhaps you could explain your use case to help me understand?

    Thread Starter fuchsdesign

    (@fuchsdesign)

    i have some images with 3000 with and 4000px height and the plugins rotate the image to 1000px width and about 800 height …

    Plugin Author nosilver4u

    (@nosilver4u)

    Hmm, I wonder if it’s having the same bug I found in EWWW IO, where the dimensions are being calculated prior to rotation instead of post-rotation. I’ll have to check that out and see if that’s what happens.

    Plugin Author nosilver4u

    (@nosilver4u)

    Yup, looks like that is the case, and that’s what I suspect is happening in your case. It’s going to be a little harder to fix the bug in Imsanity due to the way the code is structured, but I’ll figure out a way to fix it.

    A temporary fix in your case might be to change the switch statement in libs/utils.php
    On line 60 where it says switch ( $orientation ) { change it to this:
    switch ( 0 ) {

    Then it will just do nothing with the orientation, as 0 is not a valid case.

    Thread Starter fuchsdesign

    (@fuchsdesign)

    ok, i try to change:

    // try to correct for auto-rotation if the info is available
    if (function_exists(‘exif_read_data’) && ($ftype == ‘jpg’ || $ftype == ‘jpeg’) ) {
    $exif = @exif_read_data($file);
    $orientation = is_array($exif) && array_key_exists(‘Orientation’, $exif) ? $exif[‘Orientation’] : 0;
    switch($orientation) {
    case 3:
    $editor->rotate(0);
    break;
    case 6:
    $editor->rotate(0);
    break;
    case 8:
    $editor->rotate(0);
    break;
    }
    }

    but it still rotates the image …

    Thread Starter fuchsdesign

    (@fuchsdesign)

    ok, i now made

    / try to correct for auto-rotation if the info is available
    if (function_exists(‘exif_read_data’) && ($ftype == ‘jpg’ || $ftype == ‘jpeg’) ) {
    $exif = @exif_read_data($file);
    $orientation = is_array($exif) && array_key_exists(‘Orientation’, $exif) ? $exif[‘Orientation’] : 0;
    switch(0) {
    case 3:
    $editor->rotate(180);
    break;
    case 6:
    $editor->rotate(-90);
    break;
    case 8:
    $editor->rotate(90);
    break;
    }
    }

    but its still not working

    Plugin Author nosilver4u

    (@nosilver4u)

    for future reference, you should put your code in code tags ??
    Anyway, that definitely turns off auto-rotation, but my suspicion is that the image isn’t really 3000 wide by 4000 high due to being rotated 90 degrees. And is rather 4000 wide and 3000 high, causing odd results. I was afraid you might still run into issues if the constraints are backwards on a 90 degree rotation. Can you post a link to the unaltered photo, and what settings you are using for resizing?

    Thread Starter fuchsdesign

    (@fuchsdesign)

    you can find my settings here: https://www.rehmann2.bim.name/wp-content/settings.png
    and the original image: https://www.rehmann2.bim.name/wp-content/dreischusterhuette5.jpg

    but anyway, i find out that i can rotate the images in wordpress/media so for me that is also working good. thanks your your effort anyway. keep up the good work of the plugin!

    Plugin Author nosilver4u

    (@nosilver4u)

    the auto-rotation glitch should be fixed in the next release.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘switch of auto rotation’ is closed to new replies.