#include "MagickCore/profile.h"
#include "MagickCore/property.h"
#include "MagickCore/quantum-private.h"
+#include "MagickCore/semaphore.h"
#include "MagickCore/static.h"
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
%
% The format of the IsJ2K method is:
%
-% MagickBooleanType IsJP2(const unsigned char *magick,const size_t length)
+% MagickBooleanType IsJ2K(const unsigned char *magick,const size_t length)
%
% A description of each parameter follows:
%
% %
% %
% %
-% I s J P C %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% IsJPC()() returns MagickTrue if the image format type, identified by the
-% magick string, is JPC.
-%
-% The format of the IsJPC method is:
-%
-% MagickBooleanType IsJPC(const unsigned char *magick,const size_t length)
-%
-% A description of each parameter follows:
-%
-% o magick: compare image format pattern against these bytes.
-%
-% o length: Specifies the length of the magick string.
-%
-*/
-static MagickBooleanType IsJPC(const unsigned char *magick,const size_t length)
-{
- if (length < 4)
- return(MagickFalse);
- if (memcmp(magick,"\x0d\x0a\x87\x0a",4) == 0)
- return(MagickTrue);
- if (length < 12)
- return(MagickFalse);
- if (memcmp(magick,"\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a",12) == 0)
- return(MagickTrue);
- return(MagickFalse);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
% R e a d J P 2 I m a g e %
% %
% %
if (LocaleCompare(image_info->magick,"JPT") == 0)
jp2_codec=opj_create_decompress(OPJ_CODEC_JPT);
else
- if (IsJ2K(sans,4) != MagickFalse || LocaleCompare(image_info->magick,
- "J2K") == 0)
+ if (IsJ2K(sans,4) != MagickFalse)
jp2_codec=opj_create_decompress(OPJ_CODEC_J2K);
else
jp2_codec=opj_create_decompress(OPJ_CODEC_JP2);
entry->version=ConstantString(version);
entry->mime_type=ConstantString("image/jp2");
entry->module=ConstantString("JP2");
- entry->magick=(IsImageFormatHandler *) IsJPC;
+ entry->magick=(IsImageFormatHandler *) IsJP2;
entry->adjoin=MagickFalse;
entry->seekable_stream=MagickTrue;
entry->thread_support=NoThreadSupport;
}
else
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
if (IsGrayColorspace(image->colorspace) != MagickFalse)
{
channels=1;