Board index » delphi » Q: Anyone having a _FAST_ dim routine for 256 color bitmap

Q: Anyone having a _FAST_ dim routine for 256 color bitmap

Hello world!

I am able to dim a bitmap using the scanline or pixel properties of a
tbitmap but it is extreemly slow.

Therefore! Does anyone of you have a code snippet that can dim a 256
colored bitmap fast ?

(With dim i mean make the image more or less dark)

Thanks
        Olrik Larsen

Delphi C/S 4.0 up3
Win NT wks 4.0 sp5

Ol...@MercuryGroup.dk

 

Re:Q: Anyone having a _FAST_ dim routine for 256 color bitmap


If you mean fading in/out with Dim then perhaps the following library could
be interesting for you:

Image Display Lib 1.1:

The Image Display Lib 1.1 contains several components which let you display
images in a very easy way. All the most important image file formats are
supported: BMP, DIB, GIF, JPG, PCD, PCX, SCR, TIF. The components offer
resize and fade in/out functions. The conversion and displaying routines are
written in C and are exported to Dynamic Link Libraries (DLLs). That is the
reason why this library is so compact and very fast.

You can download a Trial Version from www.terratronic.com

Olrik Larsen schrieb in Nachricht <377a207e.21497...@forums.inprise.com>...

Quote
>Hello world!

>I am able to dim a bitmap using the scanline or pixel properties of a
>tbitmap but it is extreemly slow.

>Therefore! Does anyone of you have a code snippet that can dim a 256
>colored bitmap fast ?

>(With dim i mean make the image more or less dark)

>Thanks
> Olrik Larsen

>Delphi C/S 4.0 up3
>Win NT wks 4.0 sp5

>Ol...@MercuryGroup.dk

Re:Q: Anyone having a _FAST_ dim routine for 256 color bitmap


How about just changing the 256 colors in the palette rather than all
the individual values of the bitmap (that tell what palette entry to
use) ?

Steve

Quote
>>I am able to dim a bitmap using the scanline or pixel properties of a
>>tbitmap but it is extreemly slow.

>>Therefore! Does anyone of you have a code snippet that can dim a 256
>>colored bitmap fast ?

>>(With dim i mean make the image more or less dark)

>>Thanks
>> Olrik Larsen

>>Delphi C/S 4.0 up3
>>Win NT wks 4.0 sp5

>>Ol...@MercuryGroup.dk

Re:Q: Anyone having a _FAST_ dim routine for 256 color bitmap


Quote
Steve Parus <spa...@umich.edu> wrote in message

news:377a31eb.1294614@forums.inprise.com...

Quote
> How about just changing the 256 colors in the palette rather than all
> the individual values of the bitmap (that tell what palette entry to
> use) ?

This is a good idea.  In fact, in 256 color display mode, AnimatePalette
could be used.

See Ray Lischner's example of palette animation at
www.tempest-sw.com/freeware/Delphi/pal10.zip
or via ftp at
ftp://ftp.tempest-sw.com/pub/delphi/pal10.zip

efg
_________________________________
efg's Computer Lab:  http://www.efg2.com/lab
Delphi Books:  http://www.efg2.com/lab/TechBooks/Delphi.htm

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

Re:Q: Anyone having a _FAST_ dim routine for 256 color bitmap


Earl F. Glynn <EarlGl...@att.net> wrote in message
news:7ldf2h$s2q1@forums.borland.com...

Quote
> This is a good idea.  In fact, in 256 color display mode, AnimatePalette
> could be used.

In high color mode just use

SetDIBColorTable

This will maintain the integrity of the bitmap's data and allow very rapid
color changes on most modern systems.
See my note Re: Changing colors in 8-bit bitmaps - The Solution (June 23,
1999 3:20 PM) in this news group.
--
Fred Hovey,
FredH@eathling_dot_net(replace _Dot_ with period to reply)

Re:Q: Anyone having a _FAST_ dim routine for 256 color bitmap


Hello World!

Thanks all, for the reply!

I will look into it on Monday I'm gone for the weekend!

Thanks
        Olrik Larsen

Delphi C/S 4.0 up3
Win NT wks 4.0 sp5

Ol...@MercuryGroup.dk

Other Threads