Copied to clipboard

Flag this post as spam?

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


  • Ben Norman 167 posts 275 karma points
    Jan 23, 2012 @ 12:24
    Ben Norman
    0

    why would one image change and another stay unchanged

    I have 2 different images. One is changed and returned as a 565x290 image and another is not changed. I use the following:

    /ImageGen.ashx?Height=290&Width=565&constrain=true&pad=true&bgcolor=000000&image={image name}

    Why would this happen and what should I look for?

    Could it be the dimensions of the image or if the image is corrupt?

    Is there a way to debug?

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Jan 23, 2012 @ 12:36
    Douglas Robar
    0

    Hi, Ben,

    There are a couple things that might be going on. For instance, if one is smaller than 290x565 and you don't allow upsizing that could do it.

    What are the dimensions of the two original images?

    Are you using ImageGen Professional (you can check by using /imagegen.ashx?version)? If so, what is in the /config/imagegen.config file as those settings may be related to the issue.

    cheers,
    doug. 

     

  • Ben Norman 167 posts 275 karma points
    Jan 23, 2012 @ 12:46
    Ben Norman
    0

    Hi Doug,

    Image that does work: 448x299

    Image that does not work is: 448x253

    ie width x height

    I am developing using localhost and http://localhost:13029/ImageGen.ashx?version renders the following.

    ImageGen Professional version 2.5.7.27945
    Professional features are available for localhost
    Professional features are available for *.local

    imagegen.ashx has not been changed from the one delivered by the installer

  • Ben Norman 167 posts 275 karma points
    Jan 23, 2012 @ 12:58
    Ben Norman
    0

    whoops, i meant the config has not changed from the installed version.

    Can I send you a copy of the images?

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Jan 23, 2012 @ 13:02
    Douglas Robar
    0

    That's perfect, thanks!

    In the ImageGen.config file you'll find a "default" class with these settings:

     

    <ClassName="default"OverridesQueryString="true">
    <AllowUpsizing>false</AllowUpsizing>
    <MaxHeight>800</MaxHeight>
    <MaxWidth>800</MaxWidth>
    </Class>

    The "default" class is always applied by default (hence the name) unless you specifically request a different class. The PDF docs explain classes in detail.

    The point here is that the <AllowUpsizing> option is false, which means ImageGen won't up-size an image. That's exactly what is going on here. One image is 448x299px and you want an image that will fit in a size of 565x290px. No problem, ImageGen will resize the image down to 461x290px and place it on a field of 565x290 because you have the 'pad=true' setting specified.

    The other image is 448x253px and when you ask ImageGen to make an image 565x290px it would have to upsize the image to do that. You don't allow upsizing so nothing is done.

    cheers,
    doug. 

  • Ben Norman 167 posts 275 karma points
    Jan 24, 2012 @ 22:30
    Ben Norman
    0

    Dude, sorry I didn't get back to you on this earlier.

    Your a bloody legend.

    This package is a superstar. It is one of the packages I install by default on every site.

    Thankyou. I will hunt you down at Code Garden and say hello.

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Jan 25, 2012 @ 10:35
    Douglas Robar
    0

    Thanks, Ben, glad you find ImageGen helpful!

    Looking forward to seeing you at CG12.

    cheers,
    doug. 

Please Sign in or register to post replies

Write your reply to:

Draft