Hi,

By trying to generate some CSA/CRD resources I have noticed that the
reported size of the actual CSA/CRD writing is bigger than the estimated
size obtained on the NULL stream.

Namely, it looks that the problem reside in the MemoryWrite, in maintaining
the iohandler->UsedSpace:


static

cmsBool  MemoryWrite(struct _cms_io_handler* iohandler, cmsUInt32Number
size, const void *Ptr)

{

    FILEMEM* ResData = (FILEMEM*) iohandler ->stream;

    if (ResData == NULL) return FALSE; // Housekeeping

    if (size == 0) return TRUE;     // Write zero bytes is ok, but does
nothing


    memmove(ResData ->Block + ResData ->Pointer, Ptr, size);

    ResData ->Pointer += size;



    if (ResData ->Pointer > iohandler->UsedSpace)

        iohandler->UsedSpace = ResData ->Pointer;



   iohandler->UsedSpace += size;  // <== I guess that this line of code
should be removed


    return TRUE;

}


Best Regards,

Claudiu.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to