[SOLVED] Error in Scanline example (from years...) lazarus / 39-Graphics ---------------------------------------------------------------------- jipété · 2024-06-20 18:21 Hello, In the last /usr/share/lazarus/3.4.0/examples/scanline, one can read, lines 22-23 of unit1.pas : 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     This example demonstrates how to    - create an image with an internal format similar to Delphi''s pf24bitand then, line 79 : 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   // create an image with a format similar to Delphi''s pf32bitSo, where is the truth ? 24 or 32 ? Then, lines 115 and 116 : 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 // LineStart is pointer to the start of a scanline with the following format:// 4 bytes per pixel. First byte is blue, second green, third is red.So I ask : what is the format of the missing fourth byte ? And finally, one can read : 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 line 121 : // fill line with [b]gray[/b]line 123 : PByte(LineStart)[i]:=0; // set red, green and blue to 0 (i.e. black) I'm lost... (of course, the image is black with a diagonal red line) ---------------------------------------------------------------------- Handoko · 2024-06-20 18:35 The fourth byte is for alpha value (transparency). If you want to learn more about scanline and pixel format I recommend this demo: https://forum.lazarus.freepascal.org/index.php/topic,37242.msg488758.h tml#msg488758 ---------------------------------------------------------------------- jipété · 2024-06-21 09:35 Hello, Thanks for the link, very interesting. But regarding the errors in the text at the beginning of /usr/share/lazarus/3.4.0/examples/scanline/unit1.pas, what can I (we) do ? ---------------------------------------------------------------------- Handoko · 2024-06-21 14:27 You can report it at the bugtrackter: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues ---------------------------------------------------------------------- bytebites · 2024-06-21 17:09 Line 79 says: 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  // create an image with a format similar to Delphi's pf32bit ---------------------------------------------------------------------- jipété · 2024-06-27 07:36 Hello, sorry for the delay but the forum didn't notify me that there was a reply... Quote from: bytebites on June 21, 2024, 07:09:48 pmLine 79 says: 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  // create an image with a format similar to Delphi's pf32bit   Yes we know. So what ? In my first post there are two lines that talk about the same thing but in a different way, and an unanswered question... beginning_of_post.png Quote from: Handoko on June 21, 2024, 04:27:36 pmYou can report it at the bugtrackter: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues Done : https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41003 Thanks for the link. ---------------------------------------------------------------------- jipété · 2024-06-29 14:50 will be fixed in 3.6.