VoyForums

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123456[7]8910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 04:20:25 10/15/01 Mon
Author: Heiko
Subject: Re: incorrect values in a colormap
In reply to: Michel 's message, "Re: incorrect values in a colormap" on 06:41:38 10/12/01 Fri

Hello Michel,

many thanks for your check of the problem with the colorvalues.

Unfortunately I can't modify the EnTifGr.Pas, because at the time I use still the trial version 1.1. I think I will buy the complete version in the next time. Please send me a corrected EnTifGr.dcu so long.

My emailadress: heikoe@freenet.de

Thanks in advance
Heiko
>
>Hi Heiko,
>
>I have found and corrected the problem.
>
>In EnTifGr.Pas,
>
>the function Cvt becomes:
>
>function Cvt( Value : Word ) : Byte;
>begin
> Result := (((Value) * LongInt(256)) div ((1 shl
>16)-1));
>end;
>
>and in SetTiffPalette, 255 is replaced by 256:
>
>{ a 16 bit palette is more common for TIFF, so
>multiple each entry by 255. }
>pBlueColorMap^[PaletteIndex] :=
> Palette.palPalEntry[PaletteIndex].peBlue*256;
>pGreenColorMap^[PaletteIndex] :=
> Palette.palPalEntry[PaletteIndex].peGreen*256;
>pRedColorMap^[PaletteIndex] :=
> Palette.palPalEntry[PaletteIndex].peRed*256;
>
>Best regards,
>
>Michel
>
>>Hello Michel,
>>
>>thank you for the response to my question 'Convert 4
>>bit to 16bit Tif'. It works now!
>>
>>But i have a new problem. Itīs importend for me, that
>>the colors in my images have exactly values.
>>I define the RGB values with the 'tagPALETTEENTRY'
>>type:
>>
>>e.g. newtifgraphic.PalettePtr^.palPalEntry[n].peRed :=
>>85;
>>
>>newtifgraphic is a TTIFFGraphic. I repeat this for
>>each colorvalue in each color in my colormap and save
>>the TIFFGraphic. And now, when I reload the graphic
>>all values are reduced by 1. Only the value 0 is
>>correct. The result of the line above is 84.
>>
>>I can't increase the value by 1, because I need often
>>the value 255 and the value 256 isn't valid in a Byte
>>array.
>>
>>Have you an idea?
>>
>>Many thanks
>>Heiko

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.