how can I get the reallocated buffer pointer
Posted: 2016-01-16T21:31:30-07:00
Hi~
I use imagemagick 6.7.9 C api
when i use BlobToImage(const ImageInfo *,const void * buf,const size_t,ExceptionInfo *) to convert raw image data (PSD) to image object, i found that this function will reallocate my image buf (use realloc()).
Actually, BlobToImage() will call ReadImage(), then ReadImage() call ReadPSDImage(), and then ReadPSDImage() wiil call SeekBlob(), the image buf is reallocated in SeekBlob(). The new buf pointer is assigned to image->blob->data, but ReadPSDImage() will call CloseBlob() finally which set image->blob->data to null.
My problem is, how can i get the reallocated buf pointer?
Please help me~ thx~
I use imagemagick 6.7.9 C api
when i use BlobToImage(const ImageInfo *,const void * buf,const size_t,ExceptionInfo *) to convert raw image data (PSD) to image object, i found that this function will reallocate my image buf (use realloc()).
Actually, BlobToImage() will call ReadImage(), then ReadImage() call ReadPSDImage(), and then ReadPSDImage() wiil call SeekBlob(), the image buf is reallocated in SeekBlob(). The new buf pointer is assigned to image->blob->data, but ReadPSDImage() will call CloseBlob() finally which set image->blob->data to null.
My problem is, how can i get the reallocated buf pointer?
Please help me~ thx~