Recent

Author Topic: lazarus TBitmap have no Palette property  (Read 3717 times)

alexraynepe196

  • New Member
  • *
  • Posts: 26
lazarus TBitmap have no Palette property
« on: November 06, 2021, 09:09:36 pm »
Hallow!
try build some delphi code, and stucks at Tbitmap.Palette - LCL version have it as protected.
Is it normal lazrus-way?
haw can i asccess to bitmap palette?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.
Re: lazarus TBitmap have no Palette property
« Reply #1 on: November 08, 2021, 11:24:08 am »
Paletted images are rarely used nowadays. It was a bigger issue with win95/8 which often was in 256 color mode.

Do you really process palletted images?

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: lazarus TBitmap have no Palette property
« Reply #2 on: November 08, 2021, 02:08:37 pm »
The old hack cast? I.e. derive from TBitmap and make the palette public.
Do not use the class but use as a hardcast.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018