]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix reanme image converter imagemagick get metadata
authorBastian Dehn <hhaalo@arcor.de>
Fri, 31 Oct 2025 17:20:27 +0000 (18:20 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 31 Oct 2025 17:20:27 +0000 (18:20 +0100)
src/kds_s2000w_image_converter_magick.c

index fc3a1ca255e43d85bb060246c31c2ab289d67112..5873e02886e320676e817275112f02b19b0aafa9 100644 (file)
@@ -59,10 +59,14 @@ void _kds_s2000w_image_converter_to_pnm(blobdata_t* in,
        exception = NULL;
 }
 
-void kds_s2000w_image_converter_metadata_from_scanner_image(blobdata_t* image, image_metadata_t* mdata)
+image_metadata_t* kds_s2000w_image_converter_get_metadata(blobdata_t* image)
 {
        kds_s2000w_debug_printf(ALL, "kds_s2000w_metadata_from_image");
 
+       image_metadata_t* mdata = malloc(sizeof(image_metadata_t));
+       if (mdata == NULL)
+               return NULL;
+
        ExceptionInfo* exception = AcquireExceptionInfo();
        ImageInfo* image_info = CloneImageInfo(NULL);
        sprintf(image_info->filename, "image.pnm");
@@ -84,6 +88,8 @@ void kds_s2000w_image_converter_metadata_from_scanner_image(blobdata_t* image, i
        input_image = NULL;
        DestroyExceptionInfo(exception);
        exception = NULL;
+
+       return mdata;
 }
 
 void kds_s2000w_image_converter_to_pnm(blobdata_t* in, blobdata_t* out)