By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 1,964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

resizing image has terrible quality

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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).

"neverstill" <sk************@yahoo.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #2

P: n/a
OK, I won't try to squeeze anything else out of it then ;)
Do you have a particular library that you like to use?
"bruce barker" <no***********@safeco.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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).

"neverstill" <sk************@yahoo.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
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


Nov 18 '05 #3

P: n/a
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.

"neverstill" <sk************@yahoo.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #4

P: n/a
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! :)

"vMike" <Mi************@nospam.gewarren.com.delete> wrote in message
news:br**********@ngspool-d02.news.aol.com...
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.

"neverstill" <sk************@yahoo.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
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


Nov 18 '05 #5

P: n/a
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.
"neverstill" <sk************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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! :)

"vMike" <Mi************@nospam.gewarren.com.delete> wrote in message
news:br**********@ngspool-d02.news.aol.com...
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.

"neverstill" <sk************@yahoo.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
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



Nov 18 '05 #6

P: n/a
Thanks Rick, bit I'm not using GetThumbnailImage.

"Rick Lemons" <ri***@cdldata.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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.
"neverstill" <sk************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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! :)

"vMike" <Mi************@nospam.gewarren.com.delete> wrote in message
news:br**********@ngspool-d02.news.aol.com...
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.

"neverstill" <sk************@yahoo.com> wrote in message
news:uQ**************@TK2MSFTNGP10.phx.gbl...
> 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
>
>



Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.