Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Mar 12, 2012 @ 08:59
    Thor Madsen-Holm
    0

    One specific image wont show in one specific widthq

    Hi, 

    I have a rather odd problem with imagegen. 
    On a livesite that has been running for about half a year i am using imagegen to show thumbnails in a width og 143 px - so i resize the original image like this: /ImageGen.ashx?image=/media/49958/Pottychairgraa.jpg&width=143
    This has been working fine so far but now one specific image wont show in that width. 
    When i paste the url into the adress bar the image does not show either, but when i change the width to any other width other than 143, the image shows just fine. 

    I tried deleting the "cached" folder and recycled the IIS but that did nothing. 
    So I am pretty much running out of ideas. 

    Has anyone had a similar problem ? 
    Any input will be much appreciated. 

    /Thor

  • Douglas Robar 3567 posts 4647 karma points MVP 6x admin c-trib
    Mar 12, 2012 @ 11:04
    Douglas Robar
    0

    Hi, Thor,

    Any chance you could share a url to the image? If you don't want to make it public, perhaps you could contact me through my site (http://www.percipientstudios.com/about/contact.aspx).

    cheers,
    doug. 

  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Mar 12, 2012 @ 11:18
    Thor Madsen-Holm
    0

    Hi Doug, 

    Thanks for your reply, i've sent you a messege with the image url via your contact form on www.percipientstudios.com/about/contact.aspx



  • Douglas Robar 3567 posts 4647 karma points MVP 6x admin c-trib
    Mar 12, 2012 @ 12:09
    Douglas Robar
    1

    Hi, Thor,

    This is a WEIRD! Thanks for the link, though, that's really helpful.

    I've downloaded the source image and run it locally with ImageGen 2.5.2 (the same version you have) and no problems at all. I can't reproduce the problem locally, though I do see the problem from your url.

    I did find one curious thing, though. The response when requesting &width=143 is only 20 bytes long (base64 encoded, it is /9j/4AAQSkZJRgABAQEAYABgAAA= ) That isn't anything like a typical response from ImageGen, being neither an image nor an error message. I don't know what it is.

    As a quick workaround, add &format=png (or =gif or =bmp) to the querystring. Then the image is returned properly. 

    It is only at 143 pixels and with format=jpg (which is the default because ImageGen always returns the same format as the source image unless told otherwise) that this behaviour is seen. I wish I could reproduce it and run it under the debugger. 

    One thing you might try is to copy the /umbraco/imagegen.ashx file to the root of your website. There was a bug in an earlier version that didn't always behave properly when not in the root, though it was related more to remote images. Still, worth a try.

    Let me know how you get on.

    cheers,
    doug.

  • Thor Madsen-Holm 82 posts 212 karma points c-trib
    Mar 12, 2012 @ 14:40
    Thor Madsen-Holm
    0

    Hi Doug, 

    Thanks alot! Unfortunately I did not have the time to test if moving the imagegen.ashx file worked. 
    So I just used your quickfix - adding the format=png which solved the problem.

    Thansk again for the quick response h5yr! :D 

    Cheers,
    Thor 

Please Sign in or register to post replies

Write your reply to:

Draft