]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/stream.c
(no commit message)
[imagemagick] / MagickCore / stream.c
index d6dc3cfd3bd80dc3c6004a5b658206cfd8748727..d32ae859d930959622dfba15363f1cb07f5ab278 100644 (file)
 %                       MagickCore Pixel Stream Methods                       %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                                 March 2000                                  %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -236,9 +236,9 @@ static void DestroyPixelStream(Image *image)
     cache_info->nexus_info=DestroyPixelCacheNexus(cache_info->nexus_info,
       cache_info->number_threads);
   if (cache_info->file_semaphore != (SemaphoreInfo *) NULL)
-    DestroySemaphoreInfo(&cache_info->file_semaphore);
+    RelinquishSemaphoreInfo(&cache_info->file_semaphore);
   if (cache_info->semaphore != (SemaphoreInfo *) NULL)
-    DestroySemaphoreInfo(&cache_info->semaphore);
+    RelinquishSemaphoreInfo(&cache_info->semaphore);
   cache_info=(CacheInfo *) RelinquishMagickMemory(cache_info);
 }
 \f
@@ -756,7 +756,7 @@ static const Quantum *GetVirtualPixelStream(const Image *image,
         }
     }
   else
-    if (cache_info->length != length)
+    if (cache_info->length < length)
       {
         RelinquishStreamPixels(cache_info);
         cache_info->length=length;
@@ -1251,10 +1251,12 @@ MagickExport Image *StreamImage(const ImageInfo *image_info,
   assert(exception != (ExceptionInfo *) NULL);
   read_info=CloneImageInfo(image_info);
   stream_info->image_info=image_info;
+  stream_info->quantum_info=AcquireQuantumInfo(image_info,(Image *) NULL);
   stream_info->exception=exception;
   read_info->client_data=(void *) stream_info;
   image=ReadStream(read_info,&WriteStreamImage,exception);
   read_info=DestroyImageInfo(read_info);
+  stream_info->quantum_info=DestroyQuantumInfo(stream_info->quantum_info);
   stream_info->quantum_info=AcquireQuantumInfo(image_info,image);
   if (stream_info->quantum_info == (QuantumInfo *) NULL)
     image=DestroyImage(image);