resizing image has terrible quality

N

neverstill

hi-

So I wrote this nice little page that will allow the managers to add images
to the products table. Without too many details to confuse everything,
basically what I'm doing is:

getting an Image
from there I'm creating a new Bitmap(Image, int w, int h);
then I'm saving that bitmap various encoder quality values.

so let's say I save a jpg with quality set to 50 and size 300 x 300
if I do the same in Photoshop, same source image, same quality settings,
same resolution.... the result is SOOOOOOooo much better.

I would expect it to be a "bit" better, but compared to the photoshop
version, the one I'm doing in code is useless. My question is... what can I
do? Does anyone know of a way to accomplish resizing that yields good
results?

Thanks for any help,
Steve
 
B

bruce barker

rescaling images well is difficult task and beyond the capabilities of the
BitMap object.. you need to get a high caliber image library if you need
this feature (there are free ones in the public domain).
 
N

neverstill

OK, I won't try to squeeze anything else out of it then ;)
Do you have a particular library that you like to use?
 
V

vMike

I have found that if you resize the image at the same proportion as the
original the quality is fine. Maybe this will help you.
 
N

neverstill

yeah, I'm doing that by getting the multiplier for the orig. resolution,
that calculating new size height from this value.
Thanks though, all help appreciated! :)
 
R

Rick Lemons

Are you using the GetThumbnailImage and where did the original .jpg come
from? If you use the GetThumbnailImage to re-size and your image came from a
digital camera, that's your problem. The GetThumbnailImage will resize an
embedded small thumbnail images stored in the original file which is smaller
than the regular image. This will cause it to enlarge the thumbnail instead
of reducing the larger real image. This will look really bad.

If this is your case, I have a work around. If not, sorry for another wrong
answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top