From: cristy Date: Wed, 8 Feb 2012 23:42:27 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6218 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7719b88fb78ce7098766d1844bc74a7628c74291;p=imagemagick --- diff --git a/Magick++/tests/attributes.cpp b/Magick++/tests/attributes.cpp index 95ca49ece..2a2ae33dc 100644 --- a/Magick++/tests/attributes.cpp +++ b/Magick++/tests/attributes.cpp @@ -1212,11 +1212,11 @@ int main( int /*argc*/, char ** argv) // // renderingIntent // - if ( image.renderingIntent() != UndefinedIntent ) + if ( image.renderingIntent() != PerceptualIntent ) { ++failures; cout << "Line: " << __LINE__ - << ", renderingIntent default is not UndefinedIntent as expected" + << ", renderingIntent default is not PerceptualIntent as expected" << endl; } diff --git a/MagickCore/colorspace.c b/MagickCore/colorspace.c index d6faa141f..957f0e0ea 100644 --- a/MagickCore/colorspace.c +++ b/MagickCore/colorspace.c @@ -214,8 +214,6 @@ MagickExport MagickBooleanType RGBTransformImage(Image *image, assert(colorspace != RGBColorspace); assert(colorspace != TransparentColorspace); assert(colorspace != UndefinedColorspace); - if (IsRGBColorspace(image->colorspace) == MagickFalse) - (void) TransformRGBImage(image,image->colorspace,exception); if (SetImageColorspace(image,colorspace,exception) == MagickFalse) return(MagickFalse); status=MagickTrue; @@ -1658,12 +1656,6 @@ MagickExport MagickBooleanType TransformRGBImage(Image *image, assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - if (IsRGBColorspace(image->colorspace) != MagickFalse) - { - if (SetImageColorspace(image,colorspace,exception) == MagickFalse) - return(MagickFalse); - return(MagickTrue); - } status=MagickTrue; progress=0; switch (image->colorspace) @@ -2441,7 +2433,6 @@ MagickExport MagickBooleanType TransformRGBImage(Image *image, break; } case YUVColorspace: - default: { /* Initialize YUV tables: @@ -2474,6 +2465,28 @@ MagickExport MagickBooleanType TransformRGBImage(Image *image, } break; } + default: + { + /* + Linear conversion tables. + */ +#if defined(MAGICKCORE_OPENMP_SUPPORT) + #pragma omp parallel for schedule(static) +#endif + for (i=0; i <= (ssize_t) MaxMap; i++) + { + x_map[i].x=(MagickRealType) i; + y_map[i].x=0.0f; + z_map[i].x=0.0f; + x_map[i].y=0.0f; + y_map[i].y=(MagickRealType) i; + z_map[i].y=0.0f; + x_map[i].z=0.0f; + y_map[i].z=0.0f; + z_map[i].z=(MagickRealType) i; + } + break; + } } /* Convert to RGB. diff --git a/MagickCore/constitute.c b/MagickCore/constitute.c index b6a9a7e3e..845d489c7 100644 --- a/MagickCore/constitute.c +++ b/MagickCore/constitute.c @@ -647,6 +647,8 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, next->magick_columns=next->columns; if (next->magick_rows == 0) next->magick_rows=next->rows; + if ((next->colorspace == sRGBColorspace) || (next->gamma == 1.0)) + next->colorspace=RGBColorspace; value=GetImageProperty(next,"tiff:Orientation",exception); if (value == (char *) NULL) value=GetImageProperty(next,"exif:Orientation",exception); diff --git a/MagickCore/image.c b/MagickCore/image.c index 59dc79115..938cd2370 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -173,6 +173,16 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info, image->storage_class=DirectClass; image->depth=MAGICKCORE_QUANTUM_DEPTH; image->colorspace=sRGBColorspace; + image->rendering_intent=PerceptualIntent; + image->gamma=0.45455f; + image->chromaticity.red_primary.x=0.6400f; + image->chromaticity.red_primary.y=0.3300f; + image->chromaticity.green_primary.x=0.3000f; + image->chromaticity.green_primary.y=0.6000f; + image->chromaticity.blue_primary.x=0.1500f; + image->chromaticity.blue_primary.y=0.0600f; + image->chromaticity.white_point.x=0.3127f; + image->chromaticity.white_point.y=0.3290f; image->interlace=NoInterlace; image->ticks_per_second=UndefinedTicksPerSecond; image->compose=OverCompositeOp;