Re: .PIC images
Posted: Mon Apr 10, 2023 11:55 am
George Gwilt once wrote In QLToday on colour conversion and used real calculations.
In an article about PNG this was formulated as: output = ROUND(input * MaxOutSample / MaxInpSample) .
But the same text also mentions Bit Replication which was giving almost identical results (not tested by me!).
e.g. Then the 3 m16 bits are written in the 3 high bits of an 6 (or 8) bit sample and repeated in the next 3 bits etc.
My "calculation" was for high to low mode and is actually mostly testing the bits and setting the bits.
For up scaling of the QL-2-QL modes in BMP/SQRview also pre-defined tables are used.
In QCP, where a single colour is converted I use the Replication method.
The tables used were probably supplied by M.Kilgus (and who dares to challenge those) but in early tests of SQRview I also tried BMPCVT by W.Lenerz and the "original" tables from the "Graphics Device Interface 2" document by Tony Tebby and found significant differences in tables when converting BMP16 to QL mode 16.
BSJR