Not sure if this is the right place to ask, please advice me if I am wrong.
Back to my problem, which is I am not sure how imagegen resizing work. All of my pictures is not good, they are all blurred. I am using imagegen this way:
Am i doing something wrong? It looks like it takes the picture from 1 side og just make is smaller until it reach the korrect size which, of course, is not good.
Thanks to both of you, It is working somehow now. Although the pictures is not being the size I am trying to make them, but that is because they can't scale right or?
There is no scale limit on the free version, so that shouldn't be the problem. The paid version can be set up to disallow upscaling, as far as i remember
Quite right, Claus, the Pro version let's you enforce a 'no upscaling' policy if you want that.
The other reason images might be fuzzy is if you are using jpgs and set the &compression= parameter very very low, which makes very small files at the expense of image quality. The default setting tries to strike a balance between image quality and filesize.
Can you let us know the original dimensions of the source image(s) and also the final size that ImageGen renders the image(s)?
I think you'll find that one of the dimensions is always 220 wide or 330 high. Because you have constrain=true the resulting image is unlikely to be exactly 220x330 unless those are also the proportions of the original image.
If you want to place the resized image in an area padded with extra space to create an image exactly 220x330 you'll want to use the pad= parameter as well.
ImageGen is doing just what it's meant to do... create an area that is 220x330, resize the original image (constrained to its original proportions) to the largest size that will fit within that area, trim off any un-used space not needed after the resizing, and finally display the resulting image.
It doesn't matter what the format of the original image is.
What were you hoping would be the result of each resizing?
I want the image to not be blurred and be of the same size. That is the goal of it, so they have a straight line where the picture end the same place and the tekst start at the same place.
So you say I need cropping, how does that work in imagegen? Og why is that needed?
With regard to being 'blurry'... I can't see the original so I can't compare. It may be that you want to use a different compression= setting than the default when you're using jpgs. It's a balance between quality and file size with jpg compression. With compression=100 you'll have maximum quality but also largest files. A value of 90 is very high quality and a noticable size savings. 80 is often a good value but quality will suffer somewhat.
Another option is to force ImageGen to output the format at png, which will always have maximum quality (though also have maximum file size). You can force the output format with the format= parameter.
To get images with the exact same size you have three options:
constrain=false (though that will distort the image and is rarely desired)
pad=true (the perfectly resized image is centered within the requested dimensions and any unused space is filled/padded with the bgcolor)
crop=resize (the image is resized to the largest size within the requested dimensions and any extra that falls outside the requested dimensions is cropped off after resizing; this is a Professional feature but you can test it on localhost or any *.local domain)
Imagegen
Hallo everyone,
Not sure if this is the right place to ask, please advice me if I am wrong.
Back to my problem, which is I am not sure how imagegen resizing work. All of my pictures is not good, they are all blurred. I am using imagegen this way:
Am i doing something wrong? It looks like it takes the picture from 1 side og just make is smaller until it reach the korrect size which, of course, is not good.
Thanks in advance.
Hi Mathias,
I have used the ImageGen packages on one of my projects, and my pictures are not blurred. I am using imagegen this way:
If this not will work for you, I think you should try ask you question in here. http://our.umbraco.org/projects/website-utilities/imagegen/imagegen-how-to
Then I am sure that Douglas Robar can guide you in the direction.
/Dennis
Imagegen in its basic form works like this:
<img src="ImageGen.ashx?image=beautiful.jpg&width=320" />
Using umbraco library's getmedia you'll do something like:
<img src="/imageGen.ashx?image={umbraco.library:GetMedia($currentPage/imageID,'false')/umbracoFile}&width=170&constrain=true" />
If you scale the image above the size you set in imagegen it will get blurry. Example:
<img src="/imageGen.ashx?image={umbraco.library:GetMedia($currentPage/imageID,'false')/umbracoFile}&width=170&constrain=true" width="700"/>
Re-reading your question, i think youre missing the
constrain=true
parameter
Thanks to both of you, It is working somehow now. Although the pictures is not being the size I am trying to make them, but that is because they can't scale right or?
There is no scale limit on the free version, so that shouldn't be the problem.
The paid version can be set up to disallow upscaling, as far as i remember
Quite right, Claus, the Pro version let's you enforce a 'no upscaling' policy if you want that.
The other reason images might be fuzzy is if you are using jpgs and set the &compression= parameter very very low, which makes very small files at the expense of image quality. The default setting tries to strike a balance between image quality and filesize.
cheers,
doug.
I am not sure I understand all of this. Look at this image, these images are all ending up in a different size. Why is that?
This is what I do:
It's hard to see details in the image you posted.
Can you let us know the original dimensions of the source image(s) and also the final size that ImageGen renders the image(s)?
I think you'll find that one of the dimensions is always 220 wide or 330 high. Because you have constrain=true the resulting image is unlikely to be exactly 220x330 unless those are also the proportions of the original image.
If you want to place the resized image in an area padded with extra space to create an image exactly 220x330 you'll want to use the pad= parameter as well.
cheers,
doug.
Though it was going to be bigger the picture, sorry about that.
I downloaded the pictures and look at the size they had at that moment, hope this is what you are looking for?
Picture1After: 220x108
Picture1Before: 596x292
Picture2After: 220x246
Picture2Before: 643x720
Picture3After: 220X165
Picture3Before: 480x360
Picture4After: 220x202
Picture4Before: 480x440
Is their a different between PNG and JPEG?
Thanks, that's perfect.
ImageGen is doing just what it's meant to do... create an area that is 220x330, resize the original image (constrained to its original proportions) to the largest size that will fit within that area, trim off any un-used space not needed after the resizing, and finally display the resulting image.
It doesn't matter what the format of the original image is.
What were you hoping would be the result of each resizing?
cheers,
doug.
Its doing exactly what you're telling it to :)
You're telling the image to retain its aspect ratio and make it no bigger than 220 pixels wide and 330 pixels high.
If you look at your after images, they are all 220 pixels wide. And none of them are more than 330 high.
If you want all images the same size, you need to implement some cropping.
I want the image to not be blurred and be of the same size. That is the goal of it, so they have a straight line where the picture end the same place and the tekst start at the same place.
So you say I need cropping, how does that work in imagegen? Og why is that needed?
Well, if you want them all to be the same height, just leave out the width parameter, but then the images will have different widths.
If you want all images to be 220pixels x 220pixels for example, you can use the image cropper datatype http://our.umbraco.org/wiki/reference/default-datatypes/image-cropper
With regard to being 'blurry'... I can't see the original so I can't compare. It may be that you want to use a different compression= setting than the default when you're using jpgs. It's a balance between quality and file size with jpg compression. With compression=100 you'll have maximum quality but also largest files. A value of 90 is very high quality and a noticable size savings. 80 is often a good value but quality will suffer somewhat.
Another option is to force ImageGen to output the format at png, which will always have maximum quality (though also have maximum file size). You can force the output format with the format= parameter.
To get images with the exact same size you have three options:
cheers,
doug.
is working on a reply...