TImage manipulatione lazarus / 39-Graphics ---------------------------------------------------------------------- xinyiman · 2016-07-28 09:52 hello guys, a question. There is a native library lazarus or who is cross-platform and has no external dependencies for manipulating picture contained in a TImage? I mainly serve rotation contrast brightness zoom thank you ---------------------------------------------------------------------- Sanem · 2016-07-28 13:08 Did you test BGRABitmap? You can edit the bitmap and then assign it into the TImage. ---------------------------------------------------------------------- xinyiman · 2016-07-28 13:20 No, you have some examples to the functions I mentioned above? ---------------------------------------------------------------------- lainz · 2016-07-28 15:55 BGRABitmap Rotate: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Bitmap.RotateCCW;  Bitmap.RotateCW;  VerticalFlip(ARect: TRect);  HorizontalFlip(ARect: TRect); Zoom: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Resample(newWidth, newHeight: integer;      mode: TResampleMode = rmFineResample): TBGRACustomBitmap; You can access the pixels this way to apply any filter you want: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i // all pixels //var  i: integer;  p: PBGRAPixel;begin  p := Bitmap.Data;   for i := Bitmap.NBPixels-1 downto 0 do  begin    p^.red := ;    p^.green := ;    p^.blue := ;    p^.alpha := ;    Inc(p);  end; Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i // scan line //var  x, y: integer;  p: PBGRAPixel;begin  for y := 0 to Bitmap.Height - 1 do  begin    p := Bitmap.Scanline[y];    for x := 0 to Bitmap.Width - 1 do    begin      p^.red := ;      p^.green := ;    p^.blue := ;      p^.alpha := ;      Inc(p);    end;  end;  Bitmap.InvalidateBitmap; ---------------------------------------------------------------------- xinyiman · 2016-07-28 16:25 But BGRABitmap run on Mac OSX?! ---------------------------------------------------------------------- lainz · 2016-07-28 17:01 Quote from: xinyiman on July 28, 2016, 06:25:36 pmBut BGRABitmap run on Mac OSX?! Yes Quote                                bgrabitmap.pas                                 --------------                  Free easy-to-use memory bitmap 32-bit,                  8-bit for each channel, transparency.                  Channels can be in the following orders:                  - B G R A (recommended for Windows, required for fpGUI)                  - R G B A (recommended for Gtk and MacOS) ---------------------------------------------------------------------- xinyiman · 2016-07-28 20:43 Ok, it works on window. Then in the next few days I try on linux and mac. Now I wanted to understand how to manage the brightness and contrast of the image. ---------------------------------------------------------------------- xinyiman · 2016-07-28 20:56 on linux I have the following problem when you compile the source. Why? How do you solve? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function TBGRASVG.GetViewBox(AUnit: TCSSUnit): TSVGViewBox;begin  with ViewBox do  begin    result.min := FUnits.ConvertCoord(min,cuCustom,AUnit);  result.size := FUnits.ConvertCoord(size,cuCustom,AUnit);  end;end;  Messaggi, avvertimenti: 1 Warning: other unit files search path (aka unit path) of "project1" contains "/home/francesco/Documenti/Lazarus_Componenti/bgrabitmap9.1", which belongs to package "BGRABitmapPack" Compile package BGRABitmapPack 9.1: Codice di uscita 256, Errori: 1 bgrasvg.pas(346,8) Error: Internal error 2012090607 ---------------------------------------------------------------------- lainz · 2016-07-28 21:39 I dont know. Try reporting it in the bgrabitmap subforum. ---------------------------------------------------------------------- circular · 2016-07-29 14:13 Continued there: http://forum.lazarus.freepascal.org/index.php/topic,33523.0.html