]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
init magick core and terminate
authorBastian Dehn <hhaalo@arcor.de>
Sun, 4 Feb 2024 17:59:02 +0000 (18:59 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 4 Feb 2024 17:59:02 +0000 (18:59 +0100)
src/kds_s2000w_image_converter.c
src/kds_s2000w_image_converter.h
tools/convert.c

index 921c86b8beec2566d6865db2d16daf4c0bcda469..9ef396c4e51cb142c59a5fa675aedb7a12852439 100644 (file)
@@ -1,3 +1,18 @@
+#include <stdio.h>
 #include <magick/MagickCore.h>
-
 #include "kds_s2000w_image_converter.h"
+
+void kds_s2000w_convert_init()
+{
+       IsMagickCoreInstantiated();
+}
+
+void kds_s2000w_convert_terminate()
+{
+       MagickCoreTerminus();
+}
+
+void kds_s2000w_convert_jpg_to_pnm(const char* filename)
+{
+       printf("open image file: %s\n", filename);
+}
\ No newline at end of file
index e042a5f4754c04fbb7d3a018e68b3d9c4b548cbd..2ba11b92a28fe2f1f4850b5da4b3ed08133a175f 100644 (file)
@@ -1,3 +1,6 @@
 #ifndef KDS_S2000W_IMAGE_CONVERTER_H
+void kds_s2000w_convert_init();
+void kds_s2000w_convert_terminate();
+
 void kds_s2000w_convert_jpg_to_pnm();
 #endif
\ No newline at end of file
index 22e13602639eb3fa71f7ba606c78a6a5972ac5f0..565385a9449aa1ce7259155da6d77d1d94736b85 100644 (file)
@@ -3,7 +3,8 @@
 
 int main(int argc, char* argv[])
 {
-       printf("Hello Converter\n");
-
+       kds_s2000w_convert_init();
+       kds_s2000w_convert_jpg_to_pnm("test.jpg");
+       kds_s2000w_convert_terminate();
        return 0;
 }
\ No newline at end of file