Syrus_BD opened this issue on Nov 17, 2012 · 12 posts
lmckenzie posted Sun, 18 November 2012 at 4:44 AM
XFX3D.net (mentioned in the link BB posted) had the best info on this. Unfortunately, it's been dead for a long time - he even had the headers to download.
I got something partially working years ago in VB6. It was basically read the .rsr until the first LF, discard those bytes, write the .pict file consisting of the header followed by the remainder of the .rsr, use imagemagick to convert the .pict to .png.
I actually used GraphicsMagick (http://www.graphicsmagick.org/) which is a fork of ImageMagick. It has a COM dll that worked better with VB for me since I wanted to avoid using a command line. Actually, I usually use the library that Artelis mentions but IIRC, the COM version at least reads but doesn't write .pict format
I say that it worked partially. It successfully converted some .rsr files but not others. The only consistent pattern I could find was that it failed on .rsr files from Japanese sites. Seems like the Japanese version of Poser was doing something different and I was frankly too lazy to try to figure it out since this was just an extra for a Poser database app.
Excerpt from the original page at XFX3D:
"Poser RSR thumbnails are 32-bit QuickDraw PICT2 images with the header swapped out for a special RSR Thumbnail header instead (as most of the meta-information in the PICT header isn't necessary and can be assumed by Poser, like the width of the image which is always 91px, for instance).
As a result, it's pretty easy to convert from PICT to RSR and vice-versa. All you have to do is remove the first 'line' (i.e what a text editor on UNIX would consider a line, the bytes up to and including the first linefeed character, aka "n" to programmers) and replace it with the appropriate header file below."
------------------------
The header I came up with was 512 null bytes followed by the data as listed at fileformat.info for a ver. 2 pict (using 72 for orig. h & V res.). All off this was several computers ago and I can't seem to get the GraphicsMacick dll registered on this machine for some reason so I can't test any of it.
EDIT: Try contacting Dizzi here at rendo - created a rsr2png converter (in freestuff here) & may be able to help or maybe do a command line version for you. It's using .NET so a better match than anything I can tell you :-)
"Democracy is a pathetic belief in the collective wisdom of individual ignorance." - H. L. Mencken