Good afternoon,
I am looking to try me skills at extracting some data from a proprietary format. I have made some progress but I wanted to contact the experts to see if I could gain some insights. The format in question is the '.clip' format created by the software 'clip studio paint'. Specifically this is a raster graphics editor (Photoshop-like) which I would like to get the image data from. There should, in the most basic usage, be a bunch of layers, each being an image. (For raster graphics, not vector)
The format seems to be not encrypted or compressed, but rather split up in some kind of archive format. All regular archive tools I have tried can't make any sense of it (zip, tar, etc). It might be an archive format more common to windows which I am not as familiar with.
Manually parsing the file with python I was able to find a raw sequence near the end which is in sqlite3 format. I was able to extract this and read the tables which contain the majority of the metadata. Unfortunately this does not shed much light on a way to extract the image data. I was able to split on a few delimiters I found in the file but still I would not find any image algorithm which was able to make sense of the delimited parts.
Outer delimiters in the file seem to look like:
b'CHNKHead'
b'CHNKFoot'
b'CHNKExta'
b'CHNKSQL'
And there are also many inner delimiters in some of these chunks like:
b'B\x00l\x00o\x00c\x00k\x00D\x00a\x00t\x00a\x00B\x00e\x00g\x00i\x00n\x00C\x00h\x00u\x00n\x00k'
b'B\x00l\x00o\x00c\x00k\x00D\x00a\x00t\x00a\x00E\x00n\x00d\x00C\x00h\x00u\x00n\x00k'
(I am guessing the special null byte separation to reduce the chance that this sequence matches other binary data?)
Anyway I am attaching my little python split and save script and the sample CSP file I am trying to read, incase anyone was interested in taking a look. http://s000.tinyupload.com/index.php?file_id=04264848249049623399