svante@kberg.se (Svante Gellerstam) (04/15/91)
I am working on a driver program that has the main function of saving images as IFF (24-bit, 8-bit grey and monochrome). I have up 'til now saved the BODY with no compression. But as the project is moving on in development and is supposed to be a quality product, I need to add the cmpByteRun algorithm. I have reinvented the wheel once more and implemented it myself. The problem is the output. Mostra likes it, DPaint likes it, PageSetterII likes it. ADPro and TAD says 'error in BODY'. Another program eats the file but messes up after three lines. I compress the BODY one row at a time. The multilevel data is converted from byte to plane organization and then fed into the compress routine. I am not sure this is right, should this data be compressed one plane at a time? I have installed a format 'disassembler' that unpacks the line and compares the lengths. They always match up. One quirk may be the a run of two becomes a duplicate run and will break a literal run. This seems in itself to be ok with ADPro. Any help appreciated! /svante -- Svante Gellerstam svante@kberg.se, d87sg@efd.lth.se
peterk@cbmger.UUCP (Peter Kittel GERMANY) (04/18/91)
In article <1991Apr15.080653.772@kberg.se> svante@kberg.se (Svante Gellerstam) writes: > > I need to add the >cmpByteRun algorithm. > >I have reinvented the wheel once more and implemented it myself. The >problem is the output. Mostra likes it, DPaint likes it, PageSetterII >likes it. ADPro and TAD says 'error in BODY'. Another program eats the >file but messes up after three lines. > >I compress the BODY one row at a time. The multilevel data is >converted from byte to plane organization and then fed into the >compress routine. This is ok. To be precise, you must compress one line of the 1st bitmap, then the same line of 2nd bitplane and so on. One thing I came across that perhaps some software needs the byte stream padded to an even number of bytes on a line, but this is only a suspicion, can't prove it. -- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions... Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk