From 71716d57f3fd7f8ab18056bf18d96173528dd751 Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 19 Mar 2014 10:11:11 +0000 Subject: [PATCH] --- PerlMagick/MANIFEST | 7 ------- PerlMagick/Magick.xs | 25 +++++++++++-------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/PerlMagick/MANIFEST b/PerlMagick/MANIFEST index 6838930d7..5baee4e1e 100644 --- a/PerlMagick/MANIFEST +++ b/PerlMagick/MANIFEST @@ -129,7 +129,6 @@ t/mpeg/input.mpg t/mpeg/read.t t/openjp2/input.jp2 t/openjp2/input.jpc -t/openjp2/input.pgx t/openjp2/read.t t/ping.t t/png/input_16.png @@ -273,9 +272,6 @@ t/reference/jng/write_jdaa.miff t/reference/jng/write_prog_idat.miff t/reference/jng/write_prog_jdaa.miff t/reference/jng/write_prog.miff -t/reference/jp2/read_jp2.miff -t/reference/jp2/read_jpc.miff -t/reference/jp2/read_pgx.miff t/reference/jpeg/read_non_interlaced.miff t/reference/jpeg/read_plane_interlaced.miff t/reference/jpeg/write_non_interlaced.miff @@ -457,9 +453,6 @@ t/reference/write/jng/write_jdaa.miff t/reference/write/jng/write_prog_idat.miff t/reference/write/jng/write_prog_jdaa.miff t/reference/write/jng/write_prog.miff -t/reference/write/jp2/read_jp2.miff -t/reference/write/jp2/read_jpc.miff -t/reference/write/jp2/read_pgx.miff t/reference/write/jpeg/read_non_interlaced.miff t/reference/write/jpeg/read_plane_interlaced.miff t/reference/write/jpeg/write_non_interlaced.miff diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index 1d73b70db..eafede766 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -9220,23 +9220,20 @@ Mogrify(ref,...) quantize_info->colorspace=(ColorspaceType) argument_list[2].integer_reference; if (attribute_flag[3] != 0) - quantize_info->dither_method=(DitherMethod) - argument_list[3].integer_reference; + quantize_info->dither=argument_list[3].integer_reference != 0 ? + MagickTrue : MagickFalse; if (attribute_flag[4] != 0) - quantize_info->measure_error=argument_list[4].integer_reference != - 0 ? MagickTrue : MagickFalse; - if (attribute_flag[5] != 0) - (void) QueryColorCompliance(argument_list[5].string_reference, - AllCompliance,&image->transparent_color,exception); - if (attribute_flag[5] && argument_list[5].integer_reference) - { - (void) QuantizeImages(quantize_info,image,exception); - goto PerlException; - } + quantize_info->measure_error= + argument_list[4].integer_reference != 0 ? MagickTrue : MagickFalse; if (attribute_flag[6] != 0) + (void) QueryColorDatabase(argument_list[6].string_reference, + &image->transparent_color,exception); + if (attribute_flag[7] != 0) quantize_info->dither_method=(DitherMethod) - argument_list[6].integer_reference; - if ((image->storage_class == DirectClass) || + argument_list[7].integer_reference; + if (attribute_flag[5] && argument_list[5].integer_reference) + (void) QuantizeImages(quantize_info,image,exception); + else if ((image->storage_class == DirectClass) || (image->colors > quantize_info->number_colors) || (quantize_info->colorspace == GRAYColorspace)) (void) QuantizeImage(quantize_info,image,exception); -- 2.40.0