]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 3 May 2013 13:39:25 +0000 (13:39 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 3 May 2013 13:39:25 +0000 (13:39 +0000)
17 files changed:
MagickCore/colorspace.c
MagickCore/compress.c
MagickCore/distribute-cache.c
MagickCore/effect.c
MagickCore/quantize.c
MagickCore/quantum-export.c
MagickCore/quantum-import.c
MagickCore/shear.c
MagickCore/statistic.c
MagickCore/string.c
coders/djvu.c
coders/palm.c
coders/tiff.c
coders/vid.c
coders/webp.c
coders/wmf.c
coders/wpg.c

index 44ccdeb9ca0f7c662333885e45ceece57f94fef0..8c6f108d578f6c33fc7884b383e3fd8038841a43 100644 (file)
@@ -82,7 +82,7 @@ typedef struct _TransformPacket
   Forward declarations.
 */
 static MagickBooleanType
-  TransformsRGBImage(Image *,const ColorspaceType,ExceptionInfo *);
+  TransformsRGBImage(Image *,ExceptionInfo *);
 \f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1907,10 +1907,10 @@ MagickExport MagickBooleanType TransformImageColorspace(Image *image,
   (void) DeleteImageProfile(image,"icc");
   (void) DeleteImageProfile(image,"icm");
   if (IssRGBColorspace(colorspace) != MagickFalse)
-    return(TransformsRGBImage(image,colorspace,exception));
+    return(TransformsRGBImage(image,exception));
   status=MagickTrue;
   if (IssRGBColorspace(image->colorspace) == MagickFalse)
-    status=TransformsRGBImage(image,image->colorspace,exception);
+    status=TransformsRGBImage(image,exception);
   if (status == MagickFalse)
     return(status);
   /*
@@ -1940,14 +1940,12 @@ MagickExport MagickBooleanType TransformImageColorspace(Image *image,
 %  The format of the TransformsRGBImage method is:
 %
 %      MagickBooleanType TransformsRGBImage(Image *image,
-%        const ColorspaceType colorspace,ExceptionInfo *exception)
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
 %    o image: the image.
 %
-%    o colorspace: the colorspace to transform the image to.
-%
 %   o exception: return any errors or warnings in this structure.
 %
 */
@@ -1991,7 +1989,7 @@ static inline void ConvertCMYKToRGB(PixelInfo *pixel)
 }
 
 static MagickBooleanType TransformsRGBImage(Image *image,
-  const ColorspaceType colorspace,ExceptionInfo *exception)
+  ExceptionInfo *exception)
 {
 #define TransformsRGBImageTag  "Transform/Image"
 
index f639a050ebb30812cf1163ad5b9842f77ac677e8..f8ecb9620fe930729eafdb675b5de5568c83fc8e 100644 (file)
@@ -968,6 +968,8 @@ MagickExport MagickBooleanType LZWEncodeImage(Image *image,const size_t length,
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   assert(pixels != (unsigned char *) NULL);
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   table=(TableType *) AcquireQuantumMemory(1UL << 12,sizeof(*table));
   if (table == (TableType *) NULL)
     return(MagickFalse);
index 7ce6cc5bbb92c13aeb6b86d84203f2b892e07825..e65a90825e7b722a71d4a01e84b1176f8c49049b 100644 (file)
@@ -394,6 +394,7 @@ static MagickBooleanType DestroyDistributeCache(SplayTreeInfo *registry,
   /*
     Destroy distributed pixel cache.
   */
+  (void) file;
   return(DeleteNodeFromSplayTree(registry,(const void *) session_key));
 }
 
@@ -875,6 +876,8 @@ MagickExport void DistributePixelCacheServer(const int port,
   /*
     Launch distributed pixel cache server.
   */
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   (void) ResetMagickMemory(&hint,0,sizeof(hint));
   hint.ai_family=AF_INET;
   hint.ai_socktype=SOCK_STREAM;
index fc7e0aefb602697873bc81eb58d63a7dc1052dcc..69d6d9af696749f669cf982d51acb397e29e2a4c 100644 (file)
@@ -924,6 +924,10 @@ static void Hull(const Image *image,const ssize_t x_offset,
   ssize_t
     y;
 
+  assert(image != (const Image *) NULL);
+  assert(image->signature == MagickSignature);
+  if (image->debug != MagickFalse)
+    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   assert(f != (Quantum *) NULL);
   assert(g != (Quantum *) NULL);
   p=f+(columns+2);
index ba864706a0c9cfc522698487a5edc3d82d742c8f..83a8e661da55e65fffde8b4e8b176dd7800d86aa 100644 (file)
@@ -454,9 +454,8 @@ static inline void AssociateAlphaPixel(const Image *image,
   alpha_pixel->alpha=(double) GetPixelAlpha(image,pixel);
 }
 
-static inline void AssociateAlphaPixelInfo(const Image *image,
-  const CubeInfo *cube_info,const PixelInfo *pixel,
-  RealPixelInfo *alpha_pixel)
+static inline void AssociateAlphaPixelInfo(const CubeInfo *cube_info,
+  const PixelInfo *pixel,RealPixelInfo *alpha_pixel)
 {
   double
     alpha;
@@ -1636,7 +1635,7 @@ static MagickBooleanType FloydSteinbergDither(Image *image,CubeInfo *cube_info,
       /*
         Store the error.
       */
-      AssociateAlphaPixelInfo(image,&cube,image->colormap+index,&color);
+      AssociateAlphaPixelInfo(&cube,image->colormap+index,&color);
       current[u].red=pixel.red-color.red;
       current[u].green=pixel.green-color.green;
       current[u].blue=pixel.blue-color.blue;
@@ -1895,7 +1894,7 @@ static MagickBooleanType RiemersmaDither(Image *image,CacheView *image_view,
       */
       (void) CopyMagickMemory(p->error,p->error+1,(ErrorQueueLength-1)*
         sizeof(p->error[0]));
-      AssociateAlphaPixelInfo(image,cube_info,image->colormap+index,&color);
+      AssociateAlphaPixelInfo(cube_info,image->colormap+index,&color);
       p->error[ErrorQueueLength-1].red=pixel.red-color.red;
       p->error[ErrorQueueLength-1].green=pixel.green-color.green;
       p->error[ErrorQueueLength-1].blue=pixel.blue-color.blue;
index d59f146d16ea7ed78c1b2cd6dc4d8cae46f3d30c..9a5ec06513528623f83e8870e6252a38d2e2f262 100644 (file)
@@ -244,6 +244,8 @@ static void ExportAlphaQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -350,6 +352,8 @@ static void ExportBGRQuantum(const Image *image,QuantumInfo *quantum_info,
   ssize_t
     bit;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -644,6 +648,8 @@ static void ExportBGRAQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -995,6 +1001,8 @@ static void ExportBlueQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -1108,6 +1116,8 @@ static void ExportCbYCrYQuantum(const Image *image,QuantumInfo *quantum_info,
   ssize_t
     n;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   n=0;
   quantum=0;
   switch (quantum_info->depth)
@@ -1521,6 +1531,8 @@ static void ExportGrayQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 1:
@@ -1777,6 +1789,8 @@ static void ExportGrayAlphaQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 1:
@@ -1981,6 +1995,8 @@ static void ExportGreenQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -2446,6 +2462,8 @@ static void ExportOpacityQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -2549,6 +2567,8 @@ static void ExportRedQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -2655,6 +2675,8 @@ static void ExportRGBQuantum(const Image *image,QuantumInfo *quantum_info,
   ssize_t
     bit;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -2949,6 +2971,8 @@ static void ExportRGBAQuantum(const Image *image,QuantumInfo *quantum_info,
   register ssize_t
     x;
 
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
index f280397453c1d37cb41da7080b966483c23fce5a..17642c19b2fffdf86d156d7cb7abae781d19dd2e 100644 (file)
@@ -264,6 +264,8 @@ static void ImportAlphaQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -382,6 +384,8 @@ static void ImportBGRQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -688,6 +692,8 @@ static void ImportBGRAQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -1041,6 +1047,8 @@ static void ImportBlueQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -1156,6 +1164,8 @@ static void ImportCbYCrYQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 10:
@@ -1597,6 +1607,8 @@ static void ImportGrayQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 1:
@@ -1909,6 +1921,8 @@ static void ImportGrayAlphaQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 1:
@@ -2114,6 +2128,8 @@ static void ImportGreenQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -2655,6 +2671,8 @@ static void ImportOpacityQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -2770,6 +2788,8 @@ static void ImportRedQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -2888,6 +2908,8 @@ static void ImportRGBQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
@@ -3194,6 +3216,8 @@ static void ImportRGBAQuantum(const Image *image,QuantumInfo *quantum_info,
   unsigned int
     pixel;
 
+  assert(image != (Image *) NULL);
+  assert(image->signature == MagickSignature);
   switch (quantum_info->depth)
   {
     case 8:
index d8b7881d9bcb088fe3dde510af97bda39a423a79..143e002eb8f4b6dad27cce9b1fb56c66620cc4b8 100644 (file)
@@ -536,6 +536,7 @@ static void RadonProjection(const Image *image,RadonInfo *source_cells,
   size_t
     step;
 
+  assert(image != (Image *) NULL);
   p=source_cells;
   q=destination_cells;
   for (step=1; step < p->width; step*=2)
index 415f483287ab19184a8131a0689f541150d4e030..d4b852487db8f76883fb491bd4e1627c03d9ae9b 100644 (file)
@@ -2315,8 +2315,7 @@ static inline void GetStandardDeviationPixelList(PixelList *pixel_list,
   *pixel=ScaleShortToQuantum((unsigned short) sqrt(sum_squared-(sum*sum)));
 }
 
-static inline void InsertPixelList(const Image *image,const Quantum pixel,
-  PixelList *pixel_list)
+static inline void InsertPixelList(const Quantum pixel,PixelList *pixel_list)
 {
   size_t
     signature;
@@ -2496,7 +2495,7 @@ MagickExport Image *StatisticImage(const Image *image,const StatisticType type,
         {
           for (u=0; u < (ssize_t) MagickMax(width,1); u++)
           {
-            InsertPixelList(image,pixels[i],pixel_list[id]);
+            InsertPixelList(pixels[i],pixel_list[id]);
             pixels+=GetPixelChannels(image);
           }
           pixels+=(image->columns-1)*GetPixelChannels(image);
index bbaaf716a0052ac0a6dc4541af1e0ffc9b4e2330..86692e5b3e51bc599fe0f5ec2d8ef79b0f78a42f 100644 (file)
@@ -2291,6 +2291,8 @@ MagickExport double *StringToArrayOfDoubles(const char *string,ssize_t *count,
   /*
     Determine count of values, and check syntax.
   */
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   *count=0;
   i=0;
   p=string;
index 8dfec8a09f9783b05076d9de55942baab84a0ed2..f8c151acf3be17ee95319b8e42178d2967abb3af 100644 (file)
@@ -322,7 +322,7 @@ process_message(ddjvu_message_t *message)
  * we use the RGB format!
  */
 static void
-get_page_image(LoadContext *lc, ddjvu_page_t *page, int x, int y, int w, int h, const ImageInfo *image_info, ExceptionInfo *exception ) {
+get_page_image(LoadContext *lc, ddjvu_page_t *page, int x, int y, int w, int h, ExceptionInfo *exception ) {
   ddjvu_format_t
     *format;
 
@@ -674,8 +674,7 @@ static Image *ReadOneDJVUImage(LoadContext* lc,const int pagenum,
 #if 1                           /* per_line */
 
         /* q = QueueAuthenticPixels(image,0,0,image->columns,image->rows); */
-        get_page_image(lc, lc->page, 0, 0, info.width, info.height, image_info,
-          exception);
+        get_page_image(lc, lc->page, 0, 0, info.width, info.height, exception);
 #else
         int i;
         for (i = 0;i< image->rows; i++)
index 6fd60fb369355deedf7f096431cb64ae404ba7ae..83abfedbc162ef7f3287063f02fe54b0b23a4869 100644 (file)
@@ -180,7 +180,7 @@ static MagickBooleanType
 %
 %  The format of the FindColor method is:
 %
-%      int FindColor(const Image *image,PixelInfo *pixel)
+%      int FindColor(PixelInfo *pixel)
 %
 %  A description of each parameter follows:
 %
@@ -189,7 +189,7 @@ static MagickBooleanType
 %    o pixel: a pointer to the PixelInfo to be matched.
 %
 */
-static int FindColor(const Image *image,PixelInfo *packet)
+static int FindColor(PixelInfo *packet)
 {
   register ssize_t
     i;
@@ -825,7 +825,7 @@ static MagickBooleanType WritePALMImage(const ImageInfo *image_info,
             q=GetAuthenticPixels(image,0,y,image->columns,1,exception);
             for (x=0; x < (ssize_t) image->columns; x++)
             {
-              SetPixelIndex(image,FindColor(image,&image->colormap[(ssize_t)
+              SetPixelIndex(image,FindColor(&image->colormap[(ssize_t)
                 GetPixelIndex(image,q)]),q);
               q+=GetPixelChannels(image);
             }
index 8baec08880c43769460c311d3235f41f4db37818..6a49a240412e4e1da62ab9b9b5ef685650659b7c 100644 (file)
@@ -2343,7 +2343,7 @@ static MagickBooleanType EncodeLabImage(Image *image,ExceptionInfo *exception)
 }
 
 static MagickBooleanType GetTIFFInfo(const ImageInfo *image_info,
-  const Image *image,TIFF *tiff,TIFFInfo *tiff_info)
+  TIFF *tiff,TIFFInfo *tiff_info)
 {
   const char
     *option;
@@ -3250,7 +3250,7 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
     /*
       Write image scanlines.
     */
-    if (GetTIFFInfo(image_info,image,tiff,&tiff_info) == MagickFalse)
+    if (GetTIFFInfo(image_info,tiff,&tiff_info) == MagickFalse)
       ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
     quantum_info->endian=LSBEndian;
     pixels=GetQuantumPixels(quantum_info);
index a95007e523a1e1608928baf65ee009f1477672a9..da9c470bc9cfc7f080770a5f420c0b4662a7be2d 100644 (file)
@@ -170,8 +170,8 @@ static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception)
     CatchException(exception);
     if (next_image == (Image *) NULL)
       break;
-    label=InterpretImageProperties(image_info,next_image,DefaultTileLabel,
-      exception);
+    label=InterpretImageProperties((ImageInfo *) image_info,next_image,
+      DefaultTileLabel,exception);
     (void) SetImageProperty(next_image,"label",label,exception);
     label=DestroyString(label);
     if (image_info->debug != MagickFalse)
index 835b09178dbfe7a501a9ef31a71084e87bafe17f..34864f60aaace29742838d567392b51a070306ef 100644 (file)
@@ -181,7 +181,7 @@ static MagickBooleanType IsWEBPImageLossless(const unsigned char *stream,
     Read extended header.
   */
   offset=RIFF_HEADER_SIZE+TAG_SIZE+CHUNK_SIZE_BYTES+VP8X_CHUNK_SIZE;
-  while (offset <= length)
+  while (offset <= (ssize_t) length)
   {
     uint32_t
       chunk_size,
@@ -566,7 +566,7 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
     for (x=0; x < (ssize_t) image->columns; x++)
     {
       *q++=(uint32_t) (image->alpha_trait == BlendPixelTrait ?
-        ScaleQuantumToChar(GetPixelAlpha(image,p)) << 24 : 0xff000000u) |
+        ScaleQuantumToChar(GetPixelAlpha(image,p)) << 24 : 0xff000000) |
         (ScaleQuantumToChar(GetPixelRed(image,p)) << 16) |
         (ScaleQuantumToChar(GetPixelGreen(image,p)) << 8) |
         (ScaleQuantumToChar(GetPixelBlue(image,p)));
index a17968568c777920c2a544db2c03a54a6e4907f8..921126b9a3fc4554d679c6856642f619d8698845 100644 (file)
@@ -451,6 +451,7 @@ int magick_progress_callback(void *context,float quantum)
   MagickBooleanType
     status;
 
+  (void) quantum;
   image=(Image *) context;
   assert(image->signature == MagickSignature);
   status=SetImageProgress(image,LoadImagesTag,TellBlob(image),
index 9d267328e2a56cd29ad6202468eb60cbebcf78a3..31c08de5017469f50feacb8d3fe31ce4814ff2d9 100644 (file)
@@ -900,11 +900,13 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
     unsigned int NumOfEntries;
   } WPGColorMapRec;
 
+  /*
   typedef struct {
     size_t PS_unknown1;
     unsigned int PS_unknown2;
     unsigned int PS_unknown3;
   } WPGPSl1Record;  
+  */
 
   Image
     *image,