Welcome, Guest
Username: Password: Remember me
Components and Libraries for Graphics Development, discussions, problems and suggestions.
  • Page:
  • 1

TOPIC:

Bitmap(or BGRAbitmap) invert color, contrast 10 years 9 months ago #4215

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
How to: invert color, set contrast.
Thank you very much,
Regards!
p.s. I tried to find(fast) but unsuccessful...

Please Log in or Create an account to join the conversation.

Bitmap(or BGRAbitmap) invert color, contrast 10 years 9 months ago #4217

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
Amazing BGRAbitmap!!! Wonderful!
p := myBGRAbmp.Data;//p -> pbgrapixel
for n := myBGRAbmp.NbPixels-1 downto 0 do
begin
p^.red := not p^.red; //invert red canal
p^.green:= not p^.green; //invert green canal
p^.blue:= not p^.blue; //invert blue canal
inc(p);
end;
So easy....
BGRAcontrols, team, thank you very much!
Regards!
p.s. Idea: wiki.freepascal.org/BGRABitmap#Direct_access_to_pixels

Please Log in or Create an account to join the conversation.

  • Page:
  • 1