• Resolved scheeko

    (@scheeko)


    I’m having an issue with retina file generation in 2.6. If I attach an image 2000×1333 if fails for my largest size (1000pixel wide, therefore half the size, so height would be 666.5>667):

    2015-02-03 10:56:52: ** RETINA INFO FOR ATTACHMENT '2015/02/Laguna-de-los-tres.jpg' **
    2015-02-03 10:56:52: - Original: Laguna-de-los-tres.jpg
    2015-02-03 10:56:53: - thumbnail: /wp-content/uploads/2015/02/Laguna-de-los-tres-200x200.jpg -> /wp-content/uploads/2015/02/[email protected] => RESIZE
    2015-02-03 10:56:53: - medium: /wp-content/uploads/2015/02/Laguna-de-los-tres-500x333.jpg -> /wp-content/uploads/2015/02/[email protected] => RESIZE
    2015-02-03 10:56:53: - large: /wp-content/uploads/2015/02/Laguna-de-los-tres-1000x667.jpg -> /wp-content/uploads/2015/02/[email protected] => FAIL

    The 1000×667 is generated ok, but it fails on 1000×667@2x. This did not happen before v2.6, as I have used this aspect ratio frequently before.

    If I crop the original image to 2000×1330, then it generates both a 1000×665 and 1000×665@2x perfectly. So maybe it’s related to the rounding of the 0.5 pixel?

    Thanks

    https://ww.wp.xz.cn/plugins/wp-retina-2x/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Actually I believed I experienced this issue with previous versions as well… I didn’t change it in the new version. Give me a few days, I am going to replicate exactly your image sizes and photo sizes. I must fix this 🙂

    Thread Starter scheeko

    (@scheeko)

    Hello Jordy,
    Thanks for the response and there’s no rush!

    Just to give a little more info, since I’m sure there’s something going on now, that didn’t happen before. Another image with the same dimensions (2000×1333):

    I went to the plugin and regenerated the retina files and it generated a 1000×666 file (the @2x, again failed). But when I check what’s on the server from an older usage, the files there were 1000×667 and 1000×667@2x.

    There’s clearly something happening with that rounding too (although I don’t understand why the conversion fails). I also wonder if it’s related to some other software or code that’s doing the actual resizing (sorry, I didn’t actually go and investigate what your plugin is doing).

    Thanks,
    F

    Plugin Author Jordy Meow

    (@tigroumeow)

    Definitely a rounding issue. The calculation of the retina image is based on the new images created by WordPress, which are themselves based on the images uploaded by the users. There was often a difference between what the plugin expects and how the images are resizes by WordPress so now the plugin allows a little error margin (2px max).

    I did some testing myself and it seems to work perfectly. Please give me one or two days and the next release should work much better for you 🙂

    Thread Starter scheeko

    (@scheeko)

    Thanks! It is a great plugin, so I’m glad I could help.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Did you get a chance to try the new version of the plugin? 🙂

    Thread Starter scheeko

    (@scheeko)

    Hello,
    it’s working perfectly!
    Thanks.

    PS: The new interface looks great.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Super thanks! I am glad everything works 🙂 Have a nice Sunday!

    Plugin Author Jordy Meow

    (@tigroumeow)

    By the way, f you have time to write a small review… please don’t hesitate 😉 Don’t worry, don’t feel like you have to do it.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Conversion fail – size rounding error? | Bug on 2.6’ is closed to new replies.