From 76424950e373d3b04ac3dd13019151bfba3e8423 Mon Sep 17 00:00:00 2001 From: sumuel Date: Mon, 17 Aug 2026 20:44:55 +0000 Subject: Add the files --- src/logo/image/image.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/logo/image/image.h (limited to 'src/logo/image/image.h') diff --git a/src/logo/image/image.h b/src/logo/image/image.h new file mode 100644 index 0000000..da3b2d2 --- /dev/null +++ b/src/logo/image/image.h @@ -0,0 +1,43 @@ +#pragma once + +#include "../logo.h" + +#if defined(FF_HAVE_IMAGEMAGICK7) || defined(FF_HAVE_IMAGEMAGICK6) + +typedef enum FF_A_PACKED FFLogoImageResult { + FF_LOGO_IMAGE_RESULT_SUCCESS, // Logo printed + FF_LOGO_IMAGE_RESULT_INIT_ERROR, // Failed to load library, try again with next IM version + FF_LOGO_IMAGE_RESULT_RUN_ERROR // Failed to load / convert image, cancel whole sixel code +} FFLogoImageResult; + +typedef struct FFLogoRequestData { + FFLogoType type; + FFstrbuf cacheDir; + + double characterPixelWidth; + double characterPixelHeight; + + uint32_t logoPixelWidth; + uint32_t logoPixelHeight; + + uint32_t logoCharacterHeight; + uint32_t logoCharacterWidth; +} FFLogoRequestData; + +typedef struct FFIMData { + void* library; + void* (*resizeFunc)(const void* image, size_t width, size_t height, void* exceptionInfo); +} FFIMData; + +FFLogoImageResult ffLogoPrintImageImpl(FFLogoRequestData* requestData, const FFIMData* imData); + +#endif + +#ifdef FF_HAVE_IMAGEMAGICK7 +FFLogoImageResult ffLogoPrintImageIM7(FFLogoRequestData* requestData); +#endif + +#ifdef FF_HAVE_IMAGEMAGICK6 + #include +FFLogoImageResult ffLogoPrintImageIM6(FFLogoRequestData* requestData); +#endif -- cgit v1.2.3