From 3fac9ec43830fab0a3f88bff607734eb99ea6b1c Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 17 Nov 2011 18:04:39 +0000 Subject: [PATCH] --- MagickCore/identify.c | 4 ++-- MagickCore/pixel.c | 24 ++++++++++++------------ MagickCore/profile.c | 2 +- MagickWand/mogrify.c | 4 ++-- coders/caption.c | 2 +- coders/msl.c | 4 ++-- coders/ps.c | 2 +- coders/tiff.c | 5 ++++- 8 files changed, 25 insertions(+), 22 deletions(-) diff --git a/MagickCore/identify.c b/MagickCore/identify.c index 1cffefe20..4c78109a1 100644 --- a/MagickCore/identify.c +++ b/MagickCore/identify.c @@ -521,8 +521,8 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file, if (colorspace != GRAYColorspace) { (void) FormatLocaleFile(file," Image statistics:\n"); - (void) PrintChannelStatistics(file,MaxPixelChannels,"Overall", - 1.0/scale,channel_statistics); + (void) PrintChannelStatistics(file,(PixelChannel) MaxPixelChannels, + "Overall",1.0/scale,channel_statistics); } channel_statistics=(ChannelStatistics *) RelinquishMagickMemory( channel_statistics); diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c index 193d63e4e..11de725ea 100644 --- a/MagickCore/pixel.c +++ b/MagickCore/pixel.c @@ -3653,40 +3653,40 @@ MagickExport void PendInitializePixelChannelMap(Image *image) assert(image->signature == MagickSignature); for (i=0; i < (ssize_t) MaxPixelChannels; i++) { - SetPixelChannelMapChannel(image,(PixelChannel) i,(PixelTrait) 0); + SetPixelChannelMapChannel(image,(PixelChannel) i,(PixelChannel) 0); SetPixelChannelMapTraits(image,(PixelChannel) i,UndefinedPixelTrait); } n=0; - SetPixelChannelMapChannel(image,RedPixelChannel,(PixelTrait) n++); + SetPixelChannelMapChannel(image,RedPixelChannel,(PixelChannel) n++); SetPixelChannelMapTraits(image,RedPixelChannel,(PixelTrait) (UpdatePixelTrait | BlendPixelTrait)); - SetPixelChannelMapChannel(image,GreenPixelChannel,(PixelTrait) n++); + SetPixelChannelMapChannel(image,GreenPixelChannel,(PixelChannel) n++); SetPixelChannelMapTraits(image,GreenPixelChannel,(PixelTrait) (UpdatePixelTrait | BlendPixelTrait)); - SetPixelChannelMapChannel(image,BluePixelChannel,(PixelTrait) n++); + SetPixelChannelMapChannel(image,BluePixelChannel,(PixelChannel) n++); SetPixelChannelMapTraits(image,BluePixelChannel,(PixelTrait) (UpdatePixelTrait | BlendPixelTrait)); if (image->colorspace == GRAYColorspace) { n=0; - SetPixelChannelMapChannel(image,RedPixelChannel,(PixelTrait) n); - SetPixelChannelMapChannel(image,GreenPixelChannel,(PixelTrait) n); - SetPixelChannelMapChannel(image,BluePixelChannel,(PixelTrait) n++); + SetPixelChannelMapChannel(image,RedPixelChannel,(PixelChannel) n); + SetPixelChannelMapChannel(image,GreenPixelChannel,(PixelChannel) n); + SetPixelChannelMapChannel(image,BluePixelChannel,(PixelChannel) n++); } if (image->colorspace == CMYKColorspace) { - SetPixelChannelMapChannel(image,BlackPixelChannel,(PixelTrait) n++); + SetPixelChannelMapChannel(image,BlackPixelChannel,(PixelChannel) n++); SetPixelChannelMapTraits(image,BlackPixelChannel,(PixelTrait) (UpdatePixelTrait | BlendPixelTrait)); } if (image->storage_class == PseudoClass) { - SetPixelChannelMapChannel(image,IndexPixelChannel,(PixelTrait) n++); + SetPixelChannelMapChannel(image,IndexPixelChannel,(PixelChannel) n++); SetPixelChannelMapTraits(image,IndexPixelChannel,CopyPixelTrait); } if (image->matte != MagickFalse) { - SetPixelChannelMapChannel(image,AlphaPixelChannel,(PixelTrait) n++); + SetPixelChannelMapChannel(image,AlphaPixelChannel,(PixelChannel) n++); SetPixelChannelMapTraits(image,AlphaPixelChannel,CopyPixelTrait); } n+=image->number_meta_channels; @@ -5469,8 +5469,8 @@ MagickExport void SetPixelChannelMap(Image *image, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) SetPixelChannelMapTraits(image,(PixelChannel) i, GetChannelBit(channel_mask,i) == 0 ? CopyPixelTrait : - image->matte == MagickFalse ? UpdatePixelTrait : - UpdatePixelTrait | BlendPixelTrait); + image->matte == MagickFalse ? UpdatePixelTrait : (PixelTrait) + (UpdatePixelTrait | BlendPixelTrait)); for ( ; i < MaxPixelChannels; i++) SetPixelChannelMapTraits(image,(PixelChannel) i,UndefinedPixelTrait); if (image->storage_class == PseudoClass) diff --git a/MagickCore/profile.c b/MagickCore/profile.c index c3f92f36c..7461072e1 100644 --- a/MagickCore/profile.c +++ b/MagickCore/profile.c @@ -103,7 +103,7 @@ /* Typedef declarations */ -struct ProfileInfo +struct _ProfileInfo { char *name; diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index 4c256e7dd..3cc8f0df7 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -2356,7 +2356,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, { (void) ProfileImage(*image,profile_info->magick, GetStringInfoDatum(profile),(size_t) - GetStringInfoLength(profile),MagickFalse); + GetStringInfoLength(profile),exception); profile=DestroyStringInfo(profile); } profile_info=DestroyImageInfo(profile_info); @@ -2369,7 +2369,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, profile=GetImageProfile(profile_image,name); if (profile != (StringInfo *) NULL) (void) ProfileImage(*image,name,GetStringInfoDatum(profile), - (size_t) GetStringInfoLength(profile),MagickFalse); + (size_t) GetStringInfoLength(profile),exception); name=GetNextImageProfile(profile_image); } profile_image=DestroyImage(profile_image); diff --git a/coders/caption.c b/coders/caption.c index ac8c18cb5..357ecaab7 100644 --- a/coders/caption.c +++ b/coders/caption.c @@ -259,7 +259,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, } if ((align != PANGO_ALIGN_CENTER) && (draw_info->direction == RightToLeftDirection)) - align=PANGO_ALIGN_LEFT+PANGO_ALIGN_RIGHT-align; + align=(PangoAlignment) (PANGO_ALIGN_LEFT+PANGO_ALIGN_RIGHT-align); pango_layout_set_alignment(layout,align); description=pango_font_description_from_string(draw_info->font == (char *) NULL ? "helvetica" : draw_info->font); diff --git a/coders/msl.c b/coders/msl.c index 2b8a24b38..30118d5de 100644 --- a/coders/msl.c +++ b/coders/msl.c @@ -4422,7 +4422,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { (void) ProfileImage(msl_info->image[n],name, GetStringInfoDatum(profile),(size_t) - GetStringInfoLength(profile),MagickFalse); + GetStringInfoLength(profile),&exception); profile=DestroyStringInfo(profile); } continue; @@ -4435,7 +4435,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, if (profile != (StringInfo *) NULL) (void) ProfileImage(msl_info->image[n],name, GetStringInfoDatum(profile),(size_t) - GetStringInfoLength(profile),MagickFalse); + GetStringInfoLength(profile),&exception); name=GetNextImageProfile(profile_image); } profile_image=DestroyImage(profile_image); diff --git a/coders/ps.c b/coders/ps.c index eb0f9f60f..988bc1ace 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -671,7 +671,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) &bounds.x1,&bounds.y1,&bounds.x2,&bounds.y2); i=1; } - if ((count != 4) || (i < priority)) + if ((count != 4) || (i < (ssize_t) priority)) continue; hires_bounds=bounds; priority=i; diff --git a/coders/tiff.c b/coders/tiff.c index f5dc09414..714d9d0d2 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1761,7 +1761,10 @@ static void TIFFTagExtender(TIFF *tiff) static const TIFFFieldInfo TIFFExtensions[] = { - { 37724, -3, -3, TIFF_UNDEFINED, FIELD_CUSTOM, 1, 1, "PhotoshopLayerData" } + { + 37724, -3, -3, TIFF_UNDEFINED, FIELD_CUSTOM, 1, 1, + (char *) "PhotoshopLayerData" + } }; TIFFMergeFieldInfo(tiff,TIFFExtensions,sizeof(TIFFExtensions)/ -- 2.40.0