From: Dirk Lemstra Date: Sun, 9 Jul 2017 21:32:04 +0000 (+0200) Subject: Implemented GetBlobSize for a custom stream. X-Git-Tag: 7.0.6-1~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82e3b7cb8da22a16fc6b1b16d486b5fc40272b5e;p=imagemagick Implemented GetBlobSize for a custom stream. --- diff --git a/MagickCore/blob.c b/MagickCore/blob.c index 2f86648a2..e3cd938d5 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -1518,7 +1518,22 @@ MagickExport MagickSizeType GetBlobSize(const Image *image) break; } case CustomStream: + { + if ((image->blob->custom_stream->teller != (CustomStreamTeller) NULL) && + (image->blob->custom_stream->seeker != (CustomStreamTeller) NULL)) + { + MagickOffsetType + offset; + + offset=image->blob->custom_stream->teller( + image->blob->custom_stream->data); + extent=image->blob->custom_stream->seeker(0,SEEK_END, + image->blob->custom_stream->data); + image->blob->custom_stream->seeker(offset,SEEK_SET, + image->blob->custom_stream->data); + } break; + } } return(extent); }