thanks a lot for the help lool.
I was wondering if JAI can help me?
Is there anything like palette defined for an entire png
image type? because the palette sounds like for a pixel for
me!
one person told me that he extracts the palette information
for gif using this code... will this work also for png
format.
------ source
// 幅 の読込
byte len1 = dis.readByte();
byte len2 = dis.readByte();
//
リトルエンディアン
width = (len2 & 0xff) * 256 + len1 & 0xff;
// 高さ の読込
byte hei1 = dis.readByte();
byte hei2 = dis.readByte();
//
リトルエンディアン
height = (hei2 & 0xff) * 256 + hei1 & 0xff;
// Packet Fields の読込
byte packetFields = dis.readByte();
// Global Color Table Flag の読込
globalColorTableFlag = ((packetFields & 128) == 128);
// Color Resolution の読込
int colorResolution = (packetFields & (16 + 32 + 64))
>> 4;
// Size of Global Color Table の読込
sizeOfGlobalColorTable = (packetFields & (1 + 2 + 4));
// palette の設定
palette = (1 << (sizeOfGlobalColorTable + 1));
-------------------------------------
Thanks and Regards,
nishant
--- Lo�c Minier <[EMAIL PROTECTED]> wrote: > Nishant
<[EMAIL PROTECTED]> - Tue, Mar 11, 2003:
>
> > I need to read a .png file and read the palette value
> as an
> > integer.
> > I dont have any idea what is a palette.
>
> I don't know if you're attached to Java, but libpng
> might help you
> more than batik will in this case. There are functions
> to retrieve the
> palette. The palette is an array of color description,
> for example
> color #0 is blue 0,0,250 etc.
>
>
> --
> Lo�c Minier <[EMAIL PROTECTED]>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
visit http://in.tv.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]