Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-08

[Pixels storage for TBitmap]

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michal Bukovjan

You could add a public byte/word property of TBitmap, say DepthConversion, and let the component/application decide whichever it needs :

0 .. for default color depth (of the file),
1-32 for specific color depth (your second case)
$FF for screen color depth

This may also be an enumerated type, whatever.

Michal Bukovjan

P Jean dit Bailleul wrote 21 lines
While reading the BMP file, i can translate them to the following color depth : 1) use the color depth of the BMP file 2) a standard (say 32 bits) whatever the color depth of the BMP and of the screen 3) use the color depth of the screen NB : Delphi use the resolution of the screen. I think they did so because under windows, if you use the color depth of the screen it work quicker than any other color depth (M$ says so in the API description). using the color depth of the screen seem to me a bad choice because if you want to edit a BMP without displying it, you should be able to work with at least the BMP resolution. Which solution do think i should use? P Jean dit Bailleul () _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.

Reply by email

Baeseman, Cliff

This also sounds like a resonable solution to me also..

Cliff

Earlier message 52 lines
-----Original Message----- From: Michal Bukovjan Sent: Friday, August 06, 1999 9:16 AM To: Subject: Re: [[lazarus] Pixels storage for TBitmap] You could add a public byte/word property of TBitmap, say DepthConversion, and let the component/application decide whichever it needs : 0 .. for default color depth (of the file), 1-32 for specific color depth (your second case) $FF for screen color depth This may also be an enumerated type, whatever. Michal Bukovjan P Jean dit Bailleul wrote: > While reading the BMP file, i can translate them to the following color > depth : > 1) use the color depth of the BMP file > 2) a standard (say 32 bits) whatever the color depth of the BMP and of the > screen > 3) use the color depth of the screen > > NB : Delphi use the resolution of the screen. I think they did so because > under windows, if you use the color depth of the screen it work quicker > than any other color depth (M$ says so in the API description). > using the color depth of the screen seem to me a bad choice because if you > want to edit a BMP without displying it, you should be able to work with at > least the BMP resolution. > > Which solution do think i should use? > P Jean dit Bailleul () > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus ____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email