amicalrahul

hi

Can anybody help me out with some example or implementation
I want to convert a lower bit (8 or 16 or less than 24 bit) *.jpg file
to 24 or higher bit jpeg file in VC++.

Here is the little bit of detail what is actually happening.
If I set color quality less than 24bit, in my system's display properties
and then in my VC++ project, I save jpg file, it get saved as 0 byte file.
but if somehow I can change the screen depth at the time of saving the jpg
file, the problem can be solved.



Re: Visual C++ Express Edition bitmap colour depth

orcmid

amicalrahul wrote:

I want to convert a lower bit (8 or 16 or less than 24 bit) *.jpg file
to 24 or higher bit jpeg file in VC++.

but if somehow I can change the screen depth at the time of saving the jpg
file, the problem can be solved.

This is not going to accomplish what you want. If the original jpeg has low color depth/gradation (because of how it was created), you can't improve by putting it on a display surface and recapturing it. The .jpg that you have (if it is really a .jpg) has as much information as you are going to get out of the image. Since it is a lossy scheme, the .jpg is likely of lower quality than the original. If you succeed with what you want, you may well end up with a visually worse image.

Why can't you use the .jpg the way it is Or take it into an image processing program and "correct" it there using image-processing functions

I guess the best question is this: What problem do you think you are solving

- Dennis






Re: Visual C++ Express Edition bitmap colour depth

nobugz

This doesn't add up. .jpeg files are always 24-bit. There is a very special 12-bit format but that's only used in medical imaging.

Show us the code you use to save the file.