| View previous topic :: View next topic |
| Author |
Message |
Joćo Pereira Guest
|
Posted: Fri Oct 03, 2003 5:53 pm Post subject: How to get jpeg color depth? |
|
|
How is it possible to do that with TJPEGImage or else...
I've try this:
TJPEGImage *Jpeg = new TJPEGImage;
Graphics::TBitmap *bmp = new Graphics::TBitmap;
Jpeg->LoadFromFile(OpenDialog1->Files->Strings[num]);
bmp->Assign(Jpeg);
switch(bmp->PixelFormat)
{
case 0: LColorA->Caption="pfDevice";
break;
case 1: LColorA->Caption="pf1bit";
break;
case 2: LColorA->Caption="pf4bit";
break;
case 3: LColorA->Caption="pf8bit";
break;
case 4: LColorA->Caption="pf15bit";
break;
case 5: LColorA->Caption="pf16bit";
break;
case 6: LColorA->Caption="pf24bit";
break;
case 7: LColorA->Caption="Costum";
break;
}
....
but it always return pf24bit.
Thx in advance.
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Sat Oct 04, 2003 6:58 am Post subject: Re: How to get jpeg color depth? |
|
|
Joćo Pereira wrote:
| Quote: | How is it possible to do that
|
Please do not refer to the Subject of your post. Put all info
in the body.
| Quote: | with TJPEGImage or else...
I've try this:
TJPEGImage *Jpeg = new TJPEGImage;
Graphics::TBitmap *bmp = new Graphics::TBitmap;
Jpeg->LoadFromFile(OpenDialog1->Files->Strings[num]);
bmp->Assign(Jpeg);
switch(bmp->PixelFormat)
.....
but it always return pf24bit.
|
That could be possible if during
bmp->Assign(Jpeg);
the colordepth was converted to pf24bit regardless of the
colordepth of the TJPEGImage.
If you want the original colordepth of the TJPEGImage then
you should investigate the TJPEGImage *Jpeg.
Hans.
|
|
| Back to top |
|
 |
|