From 82e3b7cb8da22a16fc6b1b16d486b5fc40272b5e Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 9 Jul 2017 23:32:04 +0200 Subject: [PATCH] Implemented GetBlobSize for a custom stream. --- MagickCore/blob.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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); } -- 2.40.0