You stille can process the 256-color PCX image file format manually in PHP, because it is an extremely simple format - we used to learn C++ on this! I still remember the basics.
Here is how You extract HEADER in PHP:
link stackoverflow.com/questions/9362954/php-convert-single-byte-to-integer-pcx-graphic-format
And from the Wiki, you know that if the picture is the most common 256-color PCX with palette, than processing the data is extremely simple:
1. Palette: last 768 bytes of the file in plain simple format: 3 bytes for R G B for colors with number 0 to 255 , like this: first triplet of bytes are RGB values for color zero, second for color 1 etc... , at positions simply as we read it.. in the order RGB : byte number 3*colour_num (Red) , byte num. 3*colour_num + 1 (Green) , byte num. 3*color_num+2 (Blue).
2. Data :) ... in order, as we read it from left to right, simply, there are only TWO possibilities:
a) IF the byte is from 0 to 191 included - it means single pixel of this colour - hence 0 to 191... the byte value IS the colour.
b) ELSE: the byte has value 192 to 255 - means: the NEXT byte is the colour of a pixel (on this line, in normal order, hence left-to-right...), which repeats itself (the same colour) THIS MANY TIMES: byteValue - 192 ; for example, byte pair of: 194 255 means:(194 - 192) = 2 times repeats pixel of COLOUR number 255
That's all. Actually really easy to implement in PHP (or in any language). :) .... the pallette-conversion-PHP-code into RGB truecolor image for the GD library will be also this simple! You have all those values here in the pallette at the end [last 768 bytes] of the PCX! Just use them to set R G B bytes of truecolor pixel in the image :)))