DescriptionAlternative GSAVE/GLOAD combo meant to reduce the large memory usage constraint associated with GSAVE.
Instead of storing raw pixel data, an algorithm searches the graphics page for rectangles of like-color, however large or small. It then stores the end points of the rectangles along with their associated colors. For average case images, such as drawings made from a palette of colors, this can reduce array sizes from hundreds or millions of bytes down to several thousand.
File also contains some fast-ish functions for drawing blocky lines with thickness.
v. 1.0.0 (05/06/20) initial release
v. 1.0.1 (05/23/20) fixed bug in GLOAD2 where copy transparent flag failed if image array was empty.
InstructionsGSAVE2 Transfer source page, X,Y,Width,Height, Transfer destination array, Redraw image flag
The saving process is destructive, meaning it overwrites the image as it compresses it. If you wish to, you can set the Redraw image flag to 1 to redraw the original image after the algorithm is finished compressing it. (Basically, asking it to call GLOAD2 on the finished product)
GLOAD2 X,Y, Image array, Copy mode
There is no need to specify a width and height, that information is stored in the GSAVE2ed Image array.
Copy mode determines whether to redraw transparent pixels. 1=yes, 0=no.