[AGGPas, fpGUI] Use CopyImage method lazarus / 39-Graphics ---------------------------------------------------------------------- Roland57 · 2026-02-24 15:37 Hello everybody. I would like to use a static background (a PNG image) for my clock. I use CopyImage method of TAgg2D, and TFpgImage. It works, but the colors are not as expected. (Compare the pictures attached.) Would you see what is wrong in my code? Regards. Roland ---------------------------------------------------------------------- dergen · 2026-02-27 08:33 Check RGBA <> BGRA or Transparent copying bug. ---------------------------------------------------------------------- Graeme · 2026-03-17 11:37 Just so others benefit from the answer, I've explained it in the link below. The static.png image is a PNG with 16-bit colour channels - something not used often. 99.99% of images normally use 8-bit colour channels. fpGUI doesn't officially support reading and displaying 16-bit colour channel images, as there simply hasn't been a need for it. Convert it to 8-bit channels using something like The GIMP and then it renders fine. https://github.com/graemeg/fpGUI/issues/164#issuecomment-4074196192 ---------------------------------------------------------------------- Roland57 · 2026-03-18 05:04 Thank you Graeme. Glad that my program is fixed. For information, here is how I converted the image with ImageMagick: $ file static.png static.png: PNG image data, 400 x 400, 16-bit/color RGBA, non- interlaced $ magick static.png PNG32:static2.png $ file static2.png static2.png: PNG image data, 400 x 400, 8-bit/color RGBA, non- interlaced But later I found I could create directly 8-bit/color image: 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   png := TFPWriterPNG.Create;  png.WordSized := FALSE;