PDA

View Full Version : Code/libraries to read PICT bitmap image files?


Kuroyume0161
02-06-2008, 08:03 PM
And, ironically, I need this on MacOS X in C or C++!

For some reason, since 10.4 and Intel Macs came into being, the alpha channel has been causing problems in these image files when using the default methods (read: QuickTime/QuickDraw). Unfortunately, no, I can't *use* another format. The source images are in that format - period. And to boot they are in Resource fork data, so, no the user can't just convert them (without a third party application).

I have considered ImageMagick but there isn't much mention of MacOS X support and I suspect that it may end up using the same routines with the same results.

I have also seen a basic v2.0 PICT format which may work for the older image files, but there are newer ones that may be using JPEG encoding (sheesh). And not much detail on the opcodes and RLE encoding and ... and ... and ... Apple loves complexity smoothed over more complexity with some more complexity, please - and it only gets worse with time, not easier.

I hate everyone! :scream::)

Kuroyume0161
02-23-2008, 07:39 AM
Thanks to the help of a friend developer, I was able to convert the PICT resources into PNG images while circumventing the current issues. Seems that Apple has turned a blind eye to this situation in lieu of security risks (buffer overflow vulnerabilities) with regards to this.

cignox1
03-15-2008, 11:24 PM
If you are still interseted, you may want to give a look to the DevIL image library. I don't knw if it supports PICT format, nor if it works on MacOS X (I bet it works though), but you may give it a try.

CGTalk Moderation
03-15-2008, 11:24 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.