RESOLVED: horrible output of an image resize

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
2049651
Posts: 29
Joined: 2015-10-20T07:29:42-07:00
Authentication code: 1151

RESOLVED: horrible output of an image resize

Post by 2049651 »

Hi.

Now I've just check about the output of resize function of IM.
I have worked on 6.2.8 x86 dll and vc++.
Is this the best output of ImageMagicK?
If yes, I'm afraid, I have to find another Image processing library.

You can also see the output the same as following me.

1.read the pengguin image at your computer(might be if you have working on windows OS, then probably you have penguinn.jpg in your picture folder of the computer .
Also, The size is 1024x768.

2. Use the IM library of resize function.
Xxx.resize("32x32");

3.once use the resize function to original size.
Xxx.resize("1024x768");

Then you can find horrible output.

Actually I hope that the output is almost back the same as original.
But the output is so very very distorted.

Is there any another solution?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: horrible output of an image resize

Post by fmw42 »

How can we reproduce your problem without the image?

Does it produce bad results in the command line rather than some API? If good results, then your API commands are wrong.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: horrible output of an image resize

Post by snibgo »

It seems the OP takes an image 1024x768 and resizes to 32x32. Then resizes this back to 1024x768.
2049651 wrote:Actually I hope that the output is almost back the same as original.
But the output is so very very distorted.
Of course, it is distorted. Shrinking the image discards 99.9% of the pixels. When you enlarge those, you won't get the original back.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: horrible output of an image resize

Post by fmw42 »

What is the point of your double resize? What do you hope to gain from that or what is its purpose. I would agree with user snibgo. Such drastic size changes will degrade the image no matter what resize filter you use. Also IM 6.2.8 is ancient -- almost 650 versions old. You should try to upgrade if you can.
2049651
Posts: 29
Joined: 2015-10-20T07:29:42-07:00
Authentication code: 1151

Re: horrible output of an image resize

Post by 2049651 »

fmw42 wrote:What is the point of your double resize? What do you hope to gain from that or what is its purpose. I would agree with user snibgo. Such drastic size changes will degrade the image no matter what resize filter you use. Also IM 6.2.8 is ancient -- almost 650 versions old. You should try to upgrade if you can.
Now I check my version is 6.9.2 Q8 dll.
Also the purpose is check that whether resize (scale) function work well or not.

Anyway, What should I do for using cubic or bicubic scale function?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: horrible output of an image resize

Post by fmw42 »

-filter catrom -resize

Sorry I do not know how to do that in any API, just the command line.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: horrible output of an image resize

Post by Bonzo »

Also the purpose is check that whether resize (scale) function work well or not.
Have you found any other software that will produce a better image under such circumstances?
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: horrible output of an image resize

Post by glennrp »

You should get much more consistent results, that don't look horrible, if you reduce to 1x1 instead of 32x32.
2049651
Posts: 29
Joined: 2015-10-20T07:29:42-07:00
Authentication code: 1151

Re: horrible output of an image resize

Post by 2049651 »

How can I close this posting? I found an my Imagemagick result not bad.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: horrible output of an image resize

Post by fmw42 »

2049651 wrote:How can I close this posting? I found an my Imagemagick result not bad.
Just edit the title of your first post in this topic. I will do that for you.
Post Reply