Forum: Poser Technical


Subject: RSR to Png specs

jdebroy opened this issue on Nov 10, 2006 · 27 posts


kuroyume0161 posted Fri, 24 November 2006 at 8:54 PM

An update to the code posted above (insert the red code):

    // Resource Data Length
    RSRHeader[8] =    (length & 0xFF000000L) >> 24;
    RSRHeader[9] =    (length & 0x00FF0000L) >> 16;
    RSRHeader[10] =    (length & 0x0000FF00L) >> 8;
    RSRHeader[11] =    (length & 0x000000FFL);
    // v1.2.1:    PICT Data Size
    RSRHeader[256] =    RSRHeader[8];
    RSRHeader[257] =    RSRHeader[9];
    RSRHeader[258] =    RSRHeader[10];
    RSRHeader[259] =    RSRHeader[11];
    // Copy of Resource Header in Resource Map
    // - Resource Map Offset
    RSRFooter[4] =    RSRHeader[4];
    RSRFooter[5] =    RSRHeader[5];
    RSRFooter[6] =    RSRHeader[6];
    RSRFooter[7] =    RSRHeader[7];

Thanks to Dizzi for finding the problem.  It was mainly a Poser RSR->PNG conversion corruption error, but this fixes that.  This sets the PICT header within the RSR file to match the size of the PICT data section.

Enjoy your weekend!

Robert

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone