> Le 18 nov. 2023 à 21:26, J Carter <jc...@ymail.com> a écrit : > > > I've upgraded Simple Components in dev_1.8 branch: > > https://sourceforge.net/p/gnoga/code/ci/dev_1.8/tree/ > > I've tested ok with GNAT FSF 13.2 from Alire. > > That compiles. Attached is a reproducer, data_error.adb, and corresponding > project file (edit the path to gnoga.gpr as needed). > > The Log call outputs > > 2023-11-18 21:03:10.59 : 4 3 > > (timestamp will vary), showing that the first dimension of a Pixel_Data_Type > is X/columns, and the 2nd is Y/rows, since the image is 4 wide and 3 high. > > The resulting PPM file contains > > P3 > 4 3 255 > 255 0 0 255 0 0 0 128 0 0 0 255 > 255 0 0 0 128 0 0 128 0 0 0 255 > 255 0 0 0 128 0 0 0 255 0 0 255 > > which is not what was drawn in the image.
Hello Jeff, I've capture the javascript string: > Array.prototype.join.call (gnoga['g12'].data) < "255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,0,128,0,254,0,128,0,255,0,128,0,255,0,128,0,254,0,0,252,252,0,0,255,255,0,0,255,255,0,0,252,252" The documentation says: ImageData.data Read only A Uint8ClampedArray representing a one-dimensional array containing the data in the RGBA order, with integer values between 0 and 255 (inclusive). The order goes by rows from the top-left pixel to the bottom-right. (https://developer.mozilla.org/en-US/docs/Web/API/ImageData) If my understanding is correct, this confirms your point, doesn't it? Gnoga String_To_Pixel_Data loops order isn't correct. Regards, Pascal. https://blady.pagesperso-orange.fr _______________________________________________ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list