resizing image has terrible quality

  • Thread starter Thread starter neverstill
  • Start date Start date
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
 
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).
 
OK, I won't try to squeeze anything else out of it then ;)
Do you have a particular library that you like to use?
 
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.
 
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! :)
 
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.
 
Back
Top