From 19d954997eb45ecf8c09446745da57cd7cd1d34f Mon Sep 17 00:00:00 2001 From: zhangjipeng Date: Tue, 24 Dec 2024 14:16:10 +0800 Subject: [PATCH] adjust image decoder's header --- ext/image_coders/apple/images_module.m | 4 ++-- ext/image_coders/gif/gif_module.c | 4 ++-- ext/image_coders/image.cmake | 2 +- ext/image_coders/jpeg/jpeg_module.c | 4 ++-- ext/image_coders/png/png_module.c | 4 ++-- ext/image_coders/psx_image_loader.c | 5 ++--- ext/image_coders/psx_image_modules.h | 2 +- ext/image_coders/webp/webp_module.c | 4 ++-- include/{picasso_image.h => images/psx_image.h} | 10 +++++----- .../psx_image_plugin.h} | 12 ++++++------ include/include.cmake | 5 +++-- test/image_info.c | 2 +- test/image_view.c | 2 +- 13 files changed, 30 insertions(+), 30 deletions(-) rename include/{picasso_image.h => images/psx_image.h} (97%) rename include/{picasso_image_plugin.h => images/psx_image_plugin.h} (95%) diff --git a/ext/image_coders/apple/images_module.m b/ext/image_coders/apple/images_module.m index 176609c..0bbc1ef 100644 --- a/ext/image_coders/apple/images_module.m +++ b/ext/image_coders/apple/images_module.m @@ -9,8 +9,8 @@ #include #include -#include "picasso_image.h" -#include "picasso_image_plugin.h" +#include "psx_image.h" +#include "psx_image_plugin.h" #include "psx_image_io.h" #include "psx_color_convert.h" diff --git a/ext/image_coders/gif/gif_module.c b/ext/image_coders/gif/gif_module.c index 24ce547..3e35716 100644 --- a/ext/image_coders/gif/gif_module.c +++ b/ext/image_coders/gif/gif_module.c @@ -9,8 +9,8 @@ #include #include -#include "picasso_image.h" -#include "picasso_image_plugin.h" +#include "psx_image.h" +#include "psx_image_plugin.h" #include "psx_image_io.h" #include "psx_color_convert.h" diff --git a/ext/image_coders/image.cmake b/ext/image_coders/image.cmake index 874befa..4508c04 100644 --- a/ext/image_coders/image.cmake +++ b/ext/image_coders/image.cmake @@ -31,7 +31,7 @@ add_library(${LIBX_IMAGE} ${PXIMG_SOURCES}) install(TARGETS ${LIBX_IMAGE} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) set_target_properties(${LIBX_IMAGE} PROPERTIES VERSION ${VERSION_INFO} SOVERSION 1) -include_directories(${PXIMG_DIR} ${PROJECT_ROOT}/include) +include_directories(${PXIMG_DIR} ${PROJECT_ROOT}/include ${PROJECT_ROOT}/include/images) target_link_libraries(psx_image PRIVATE ${LIB_NAME}) if (UNIX AND NOT APPLE) diff --git a/ext/image_coders/jpeg/jpeg_module.c b/ext/image_coders/jpeg/jpeg_module.c index b07ff41..e27d64e 100644 --- a/ext/image_coders/jpeg/jpeg_module.c +++ b/ext/image_coders/jpeg/jpeg_module.c @@ -9,8 +9,8 @@ #include #include -#include "picasso_image.h" -#include "picasso_image_plugin.h" +#include "psx_image.h" +#include "psx_image_plugin.h" #include "psx_image_io.h" #include "psx_color_convert.h" diff --git a/ext/image_coders/png/png_module.c b/ext/image_coders/png/png_module.c index 8ba4b03..99ef244 100644 --- a/ext/image_coders/png/png_module.c +++ b/ext/image_coders/png/png_module.c @@ -10,8 +10,8 @@ #include #include -#include "picasso_image.h" -#include "picasso_image_plugin.h" +#include "psx_image.h" +#include "psx_image_plugin.h" #include "psx_image_io.h" #include "psx_color_convert.h" diff --git a/ext/image_coders/psx_image_loader.c b/ext/image_coders/psx_image_loader.c index 814d528..5e6ce37 100644 --- a/ext/image_coders/psx_image_loader.c +++ b/ext/image_coders/psx_image_loader.c @@ -10,9 +10,8 @@ #include #include "picasso.h" -#include "picasso_image.h" -#include "picasso_image_plugin.h" - +#include "psx_image.h" +#include "psx_image_plugin.h" #include "psx_image_io.h" #include "psx_image_modules.h" #include "psx_image_loader.h" diff --git a/ext/image_coders/psx_image_modules.h b/ext/image_coders/psx_image_modules.h index ea37498..423af2c 100644 --- a/ext/image_coders/psx_image_modules.h +++ b/ext/image_coders/psx_image_modules.h @@ -9,7 +9,7 @@ #include "psx_list.h" #include "psx_image_io.h" -#include "picasso_image_plugin.h" +#include "psx_image_plugin.h" struct image_coder_node { struct list_hdr head; diff --git a/ext/image_coders/webp/webp_module.c b/ext/image_coders/webp/webp_module.c index cd97995..4ebd0ac 100644 --- a/ext/image_coders/webp/webp_module.c +++ b/ext/image_coders/webp/webp_module.c @@ -9,8 +9,8 @@ #include #include -#include "picasso_image.h" -#include "picasso_image_plugin.h" +#include "psx_image.h" +#include "psx_image_plugin.h" #include "psx_image_io.h" #include "psx_color_convert.h" diff --git a/include/picasso_image.h b/include/images/psx_image.h similarity index 97% rename from include/picasso_image.h rename to include/images/psx_image.h index 9f4eba5..e538fe0 100644 --- a/include/picasso_image.h +++ b/include/images/psx_image.h @@ -1,12 +1,12 @@ /** - * \file picasso_image.h + * \file psx_image.h * \author Zhang Ji Peng * \date 2012/1/31 * * This file includes all interfaces of picasso extended image decoders. \verbatim - Copyright (C) 2008 ~ 2018 Zhang Ji Peng + Copyright (C) 2008 ~ 2024 Zhang Ji Peng All rights reserved. @@ -15,8 +15,8 @@ \endverbatim */ -#ifndef _PICASSO_EXT_IMAGE_DECODERS_H_ -#define _PICASSO_EXT_IMAGE_DECODERS_H_ +#ifndef _PSX_IMAGE_DECODERS_H_ +#define _PSX_IMAGE_DECODERS_H_ #include "picasso.h" @@ -270,4 +270,4 @@ PEXPORT int PICAPI psx_image_destroy(psx_image* image); } #endif -#endif /*_PICASSO_EXT_IMAGE_DECODERS_H_*/ +#endif /*_PSX_IMAGE_DECODERS_H_*/ diff --git a/include/picasso_image_plugin.h b/include/images/psx_image_plugin.h similarity index 95% rename from include/picasso_image_plugin.h rename to include/images/psx_image_plugin.h index fee6f00..df67a57 100644 --- a/include/picasso_image_plugin.h +++ b/include/images/psx_image_plugin.h @@ -1,12 +1,12 @@ /** - * \file picasso_image_plugin.h + * \file psx_image_plugin.h * \author Zhang Ji Peng * \date 2012/1/31 * * This file includes all interfaces of image decoder backend. \verbatim - Copyright (C) 2008 ~ 2018 Zhang Ji Peng + Copyright (C) 2008 ~ 2024 Zhang Ji Peng All rights reserved. @@ -15,11 +15,11 @@ \endverbatim */ -#ifndef _PICASSO_IMAGE_PLUGININ_INTERFACE_H_ -#define _PICASSO_IMAGE_PLUGININ_INTERFACE_H_ +#ifndef _PSX_IMAGE_PLUGININ_INTERFACE_H_ +#define _PSX_IMAGE_PLUGININ_INTERFACE_H_ #include "picasso.h" -#include "picasso_image.h" +#include "psx_image.h" #ifdef __cplusplus extern "C" { @@ -183,4 +183,4 @@ PEXPORT const char* psx_image_module_get_string(int id); } #endif -#endif /*_PICASSO_IMAGE_PLUGININ_INTERFACE_H_*/ +#endif /*_PSX_IMAGE_PLUGININ_INTERFACE_H_*/ diff --git a/include/include.cmake b/include/include.cmake index 1c64fc6..f726f70 100644 --- a/include/include.cmake +++ b/include/include.cmake @@ -3,8 +3,9 @@ # Copyright (C) 2024 Zhang Ji Peng # Contact: onecoolx@gmail.com -file(GLOB_RECURSE PICASSO_HEADERS ${PROJECT_ROOT}/include/*.h) - +file(GLOB_RECURSE PICASSO_HEADERS ${PROJECT_ROOT}/include/picasso.h) install(FILES ${PICASSO_HEADERS} DESTINATION include/picasso) +file(GLOB_RECURSE PSX_IMAGES_HEADERS ${PROJECT_ROOT}/include/images/*.h) +install(FILES ${PSX_IMAGES_HEADERS} DESTINATION include/picasso/images) diff --git a/test/image_info.c b/test/image_info.c index 060444b..fe1b662 100644 --- a/test/image_info.c +++ b/test/image_info.c @@ -9,7 +9,7 @@ #include #define DIRPREFIX "/" #endif -#include "picasso_image.h" +#include "psx_image.h" static char full_path[1024]; diff --git a/test/image_view.c b/test/image_view.c index cbe11b5..36a84c9 100644 --- a/test/image_view.c +++ b/test/image_view.c @@ -3,7 +3,7 @@ #include #include "../include/picasso.h" -#include "../include/picasso_image.h" +#include "../include/images/psx_image.h" #include "drawFunc.h" #if defined(WIN32) #include