Not too sure here..
But given me some idea....sorry maybe going slightly off!
To be able to "compress" graphical files even further.. By-
- Loading image into memblock
- Looping through taking each byte
- Each byte consists of R G B A
- Loop through and forgot the Alpha bit - this is generally 255 anyway on an external image
- With the Alpha bit removed, we can shift 1 byte from the next one
Thus, reducing an image
So, eg an image before..
192,28,39,255,38,56,54,255,58,102,102,255,82,78,92,255,63,98,253,255,28,39,45,255,39,10,29,255,38,92,89,255,28,33,44,255 = 36 bytes of 4 (plus 12 header) == 156b file
compressed=
192,28,39,38,56,54,58,102,102,82,78,92,63,98,253,28,39,45,39,10,29,38,92,89,28,33,44 = 27 bytes of 4 (plus 12 header )== 120b file
----
Decompess - just read in the first 3 bytes and add a 255 byte and set memblock and loop round until image is complete
Damo
Using Tier 1 AppGameKit V2
Started coding with AMOS