From: Bastian Dehn Date: Sun, 4 Feb 2024 17:59:02 +0000 (+0100) Subject: init magick core and terminate X-Git-Tag: v1.0.0^2~344^2~15 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=1a339f2e959dc54b4a5445fd7ae446024b87c5f2;p=sane-kds-s2000w-net.git init magick core and terminate --- diff --git a/src/kds_s2000w_image_converter.c b/src/kds_s2000w_image_converter.c index 921c86b..9ef396c 100644 --- a/src/kds_s2000w_image_converter.c +++ b/src/kds_s2000w_image_converter.c @@ -1,3 +1,18 @@ +#include #include - #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 diff --git a/src/kds_s2000w_image_converter.h b/src/kds_s2000w_image_converter.h index e042a5f..2ba11b9 100644 --- a/src/kds_s2000w_image_converter.h +++ b/src/kds_s2000w_image_converter.h @@ -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 diff --git a/tools/convert.c b/tools/convert.c index 22e1360..565385a 100644 --- a/tools/convert.c +++ b/tools/convert.c @@ -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