Copied to clipboard

Flag this post as spam?

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


  • awm 187 posts 376 karma points
    Oct 03, 2012 @ 14:07
    awm
    0

    Wrong dimension images are being cached

    Hi Doug,

    I've got a template that calls imagegen multiple times to re-size an image into different dimensions. At the moment I have the following urls:

    '/ImageGen.ashx?image=/media/2424/test.jpg&width=960&width=600&constrain=false'
    '/ImageGen.ashx?image=/media/2424/test.jpg&width=864&width=540&constrain=false'
    '/ImageGen.ashx?image=/media/2424/test.jpg&width=768&height=480&constrain=false'
    '/ImageGen.ashx?image=/media/2424/test.jpg&width=320&height=200&constrain=false'

    The image I've uploaded into the media section is 960px wide and 600px high. I've checked the media folder for the raw image and it's sitting there with the right dimensions. However as soon as I load up the page, the newly created cached files for the first two links don't work properly. The other two come out correctly.

    For some reason the first two images get resized to 800x600. Any ideas why? I've tried changing the image, deleting the cache multiple times and restarting IIS but nothing seems to make a difference. I've also tried switching up the parameters by using 'nocache=true' and 'format=png' and they didn't help either.

    FYI I'm using umbraco v4.7.1.1 and ImageGen v2.5.7

     

  • awm 187 posts 376 karma points
    Oct 03, 2012 @ 14:09
    awm
    0

    You can delete all this. It's no bug - I didn't realise there was a max height/width specified in the config :-)

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Oct 03, 2012 @ 14:27
    Douglas Robar
    1

    Please take a look at the /config/imagegen.config file... do you have a "default" class that specifies the maxwidth and/or maxheight and/or constrain? I suspect you do and when using ImageGen Professional the default class will be applied. The class system is fantastically powerful and helpful but is worth reading about in the docs to get the most out of it.

    cheers,
    doug. 

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Oct 03, 2012 @ 14:27
    Douglas Robar
    0

    Haha - you beat me to it!

    cheers,
    doug. 

Please Sign in or register to post replies

Write your reply to:

Draft