#include "MagickCore/utility.h"
#if defined(MAGICKCORE_HEIC_DELEGATE)
#include <libde265/de265.h>
+#if defined(MAGICKCORE_WINDOWS_SUPPORT)
+#include <heif.h>
+#else
#include <libheif/heif.h>
#endif
+#endif
-static MagickBooleanType
- WriteHEICImage(const ImageInfo *,Image *,ExceptionInfo *);
-
-
-/*
- Typedef declarations.
-*/
#if defined(MAGICKCORE_HEIC_DELEGATE)
+#if !defined(MAGICKCORE_WINDOWS_SUPPORT)
+static MagickBooleanType
+ WriteHEICImage(const ImageInfo *,Image *,ExceptionInfo *);
+#endif
-\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
%
*/
static Image *ReadHEICImage(const ImageInfo *image_info,
- ExceptionInfo *exception)
+ ExceptionInfo *exception)
{
Image
*image;
ssize_t
count;
-
/*
Open image file.
*/
assert(image_info->signature == MagickCoreSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
- image_info->filename);
+ image_info->filename);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickCoreSignature);
image=AcquireImage(image_info,exception);
entry=AcquireMagickInfo("HEIC","HEIC","High Efficiency Image Format");
#if defined(MAGICKCORE_HEIC_DELEGATE)
entry->decoder=(DecodeImageHandler *) ReadHEICImage;
+#if !defined(MAGICKCORE_WINDOWS_SUPPORT)
entry->encoder=(EncodeImageHandler *) WriteHEICImage;
+#endif
#endif
entry->magick=(IsImageFormatHandler *) IsHEIC;
entry->mime_type=ConstantString("image/x-heic");
}
-
-static struct heif_error heif_write_func(struct heif_context* ctx,
- const void* data,
- size_t size,
- void* userdata)
-{
- Image* image = (Image*)userdata;
- (void) WriteBlob(image, size, data);
-
- struct heif_error error_ok;
- error_ok.code = heif_error_Ok;
- error_ok.subcode = heif_suberror_Unspecified;
- error_ok.message = "ok";
- return error_ok;
-}
-
-
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% o exception: return any errors or warnings in this structure.
%
*/
-#if defined(MAGICKCORE_HEIC_DELEGATE)
+#if defined(MAGICKCORE_HEIC_DELEGATE) && !defined(MAGICKCORE_WINDOWS_SUPPORT)
+static struct heif_error heif_write_func(struct heif_context* ctx,
+ const void* data,
+ size_t size,
+ void* userdata)
+{
+ Image* image = (Image*)userdata;
+ (void) WriteBlob(image, size, data);
+
+ struct heif_error error_ok;
+ error_ok.code = heif_error_Ok;
+ error_ok.subcode = heif_suberror_Unspecified;
+ error_ok.message = "ok";
+ return error_ok;
+}
+
static MagickBooleanType WriteHEICImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{