I am attempting to write a set of subroutines which are capable of manipulating the proprietary Photoshop paths stored in the IRBs of images saved by Photoshop. The relevant IDs are between 0x07D0 and 0x0BB6, with selector values of 1 or 2 (closed subpath bezier knots). The minimal documentation I've been able to locate seems to indicate that these records contain 3 quadwords describing control and anchor points, which are further subdivided into two dwords describing the vertical and horizontal components. My documentation states that these dwords are fixed-point values with 8 bits before the binary point and 24 bits after the binary point. I see that ImageMagick can already handle this: the following command will output an SVG describing the 8BIM embedded path named PATH_NAME:
identify -format '%[8BIM:1999,2998:PATH_NAME]' some_image.jpg
The problem I'm having is that I can't locate the code which actually does this conversion and I don't understand the data format that the individual dwords are stored in. Initially I thought I might be able to just use gcc's _Decimal32, but that appears not to be the case. Can anyone describe how to understand / decode these values, or point me to the code in ImageMagick which does so?
Photoshop image resource blocks
Re: Photoshop image resource blocks
See Get8BIMProperty() in magick/property.c.
Re: Photoshop image resource blocks
Thank you very much. It looks like the relevant information is available in TracePSClippath() on line 1669, which is called near the end of Get8BIMProperty(). I also managed to find corroborating evidence from another project (psdparse) here:
http://telegraphics.com.au/svn/psdparse ... esources.c
Hopefully this post will be useful to anyone trying to do what I'm doing in the future. All praises to the ImageMagic developers!
http://telegraphics.com.au/svn/psdparse ... esources.c
Hopefully this post will be useful to anyone trying to do what I'm doing in the future. All praises to the ImageMagic developers!