Success! Adjusting the WriteRLE line length using "width" instead of "width*2" solved it. Now it works great when saving Targa 16bit RLE.
Now to fix 8bit RLE.
Edited by miker1264 on 22-05-2026 22:48,
2 days ago
miker1264 attached the following image:
Actually, My WriteRLE function in Targa Datatype is working great !
At first I thought there was an error in the RLE conversion because the program I was using to make RLE compressed test images wouldn't open the newly encoded 8bit files.
Pixelformer kept saying "Invalid Data". But Photoshop CS4, Gimp and PaintDotNet and even MultiView had no issues with the new 8bit RLE file.
So it seems my new Targa Datatype can correctly encode RLE for 8,16,24,32 bit images!!
miker1264 attached the following image:
The screenshot shows MultiView using Targa Datatype opening the newly compressed 8bit RLE image.
Pixelformer has some strange RLE sequences that are an RLE variant rather than PackBits. For example it writes a sequence similar to this: "04 AA BB CC DD.EE 00" where my WriteRLE function does this: "05 AA BB.CC DD EE". Pixelformer adds a zero as a padding byte at the end.
It's not standard RLE but it can be read by Targa Datatype. It has no problem using ReadTarga to decode the non-standard RLE sequences. Pixelformer, however, is very picky!! If it's not the format it expects it says "Invalid Data" for the 8bit RLE.
The other screenshot is my current version of 32bit AROS Native. I'll update my system files. Also, I plan to install AROS One x86 and x86-64 in a virtual machine for testing.
Edited by miker1264 on 24-05-2026 16:02,
2 hours ago
miker1264 attached the following image:
You may be wondering if Targa Datatype is fully functional what is the delay? Why not release it now?
In my opinion it's not 100% complete. I have to re-write some parts & add a few new features.
For ReadTarga & WriteTarga I want to support adding the Targa Footer "TRUEVISION-XFILE.. because the 8 bytes proceeding the Targa Footer is the Developers Area with optional data. We also have to support GREY8 images which are 8bit images with no ColorMap. And lastly, ReadTarga has to set CmpByteRun1 in the bmhd if the input image is RLE compressed.
After all that it will be complete.
Edited by miker1264 on 24-05-2026 17:11,
21 minutes ago