Recent

Author Topic: How to change TBitmap palette?  (Read 3827 times)

pixel_

  • New member
  • *
  • Posts: 8
How to change TBitmap palette?
« on: November 25, 2021, 05:19:02 am »
Hello. Can you help me please, how to change TBitmap palette for pf8bit or for pf4bit mode?

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 748
Re: How to change TBitmap palette?
« Reply #1 on: December 03, 2021, 07:26:24 am »
Unfortunately, I don't think it's implemented in Lazarus. But if you don't care about staying cross-platform, you can still do it directly via CreatePalette, RealizePalette, SelectPalette and DeleteObject, while assuming, that Canvas.Handle - is actually HDC.
« Last Edit: December 03, 2021, 07:31:18 am by Mr.Madguy »
29.12.2021 - migration to DynamicData 4.1 is completed - complete overhaul of data access driver.
My project still requires full Delphi 2009 support to be ported to Lazarus.
It's time to finally do it, because Delphi 2009 is 12 years old.

pixel_

  • New member
  • *
  • Posts: 8
Re: How to change TBitmap palette?
« Reply #2 on: December 03, 2021, 08:58:24 pm »
Thank you. I would like to know if cross-platform solution exist? I have installed Linux.

 

TinyPortal © 2005-2018