Disclaimer: I am not a programmer. I employ a very loyal ones... of who I have doubts about their ability to tell me what is what with Image Magick.
I have a couple websites where my users are charged with uploading head shots of themselves. In that I am a former Litho/Color separation nerd, it really bugs me that my users usually upload overly large photos of themselves and know nothing of pixel widths. What I get are people who upload images that range from 600 to 2400 pixels in width - for an area I can fit 190 pixels.
With Image Magick, those images scale and look like crap. When I query my guys about quality issues, I get "it is what it is" - so therefore, we tend to just tell the users to send us the photo so we can prepare it properly in Photoshop at the actual size needed.
Can somebody direct me to documentation where I can forward image handling methods to sharpen the image after resize? or are we truly stuck with blurry resize images.
I truly apologize if this post sounds ignorant, but I really need to know if we're missing something we ought to know more about.
Thanks in advance for the help.
_________________________________
My Mortgage Websites
Sorry for my ignorance... (image resize question)
Sorry for my ignorance... (image resize question)
Last edited by mtbinary on 2012-05-02T08:59:29-07:00, edited 2 times in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Sorry for my ignorance... (image resize question)
Are you saying the images look poor quality when viewed or when printed. If the latter, the issue is setting the density for print with the images or after they have been upload. If they look poor when viewed at full resolution, then there are several tools that can be used to sharpen the image in ImageMagick. Some of them are -sharpen, -adaptive-sharpen and -unsharp. You can see the documentation at
http://www.imagemagick.org/script/comma ... ptions.php
and
http://www.imagemagick.org/Usage/blur/#sharpen
http://www.imagemagick.org/Usage/convolve/#sharpening
Also I have some bash unix scripts that do some sharpening. You can see those at my web site listed below. See the table, Scripts By Category, and click on the links to see examples.
http://www.imagemagick.org/script/comma ... ptions.php
and
http://www.imagemagick.org/Usage/blur/#sharpen
http://www.imagemagick.org/Usage/convolve/#sharpening
Also I have some bash unix scripts that do some sharpening. You can see those at my web site listed below. See the table, Scripts By Category, and click on the links to see examples.
Re: Sorry for my ignorance... (image resize question)
Any sample?
What is the command line used?
(Is this topic more appropriate for the "Users" forum?)
What is the command line used?
(Is this topic more appropriate for the "Users" forum?)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Sorry for my ignorance... (image resize question)
henrywho wrote:Any sample?
What is the command line used?
(Is this topic more appropriate for the "Users" forum?)
Yes, it would be more appropriate in the Users forum.
But you did not say whether this is an issue of the raw image or of printing, what image format.
Have you looked at the examples on the references I mentioned? Before I can give you more details, I need to understand better and perhaps see an example image. Can you post a link to a before and after example and the command line you are using? You can put your images on any free image hosting web site and then just put the link from that location in your post.
If the issue is scaling down (downsizing), then perhaps you are using the wrong function. If using -scale or -sample, then you will get poor results. The correct downsizing will come from using -resize. But if you still need to sharpen them, do the following:
convert image -resize 190x190 -sharpen 0x1 result
you can also add -filter xxx and choose the resizing filter. However, the default -filter is usually the best for most real images (not cartoons).
see
http://www.imagemagick.org/Usage/resize/
Here is a simple example
convert lena.bmp -resize 190x190 lena190.png
convert lena.bmp -resize 190x190 -sharpen 0x1 lena190_s1.png
Re: Sorry for my ignorance... (image resize question)
Try these too:
if Catrom and the default Lagrange are not sharp enough, you can use bigger support values for Lagrange:
Code: Select all
for %F in (Lagrange Catrom Gaussian RobidouxSharp LanczosSharp Lanczos2Sharp Robidoux) do (
convert.exe lena.bmp -colorspace RGB -filter %~F -distort resize 190x190! -alpha off +repage -colorspace sRGB -quality 95 "lena_%~F.png"
)
Code: Select all
for %S in (3 5 7) do (
convert.exe lena.bmp -colorspace RGB -define filter:support=%~S -filter Lagrange -distort resize 190x190! -alpha off +repage -colorspace sRGB -quality 95 "lena_Lagrange_s%~S.png"
)
Re: Sorry for my ignorance... (image resize question)
Thank you!!!
I don't know which forum this belongs in, but I sure do appreciate the links to documentation!
I don't know which forum this belongs in, but I sure do appreciate the links to documentation!