Skip to content

Commit

Permalink
adjust image decoder's header
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjipeng committed Dec 24, 2024
1 parent dd7dbff commit 19d9549
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions ext/image_coders/apple/images_module.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <stdint.h>
#include <string.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_color_convert.h"
Expand Down
4 changes: 2 additions & 2 deletions ext/image_coders/gif/gif_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <stdint.h>
#include <string.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_color_convert.h"
Expand Down
2 changes: 1 addition & 1 deletion ext/image_coders/image.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions ext/image_coders/jpeg/jpeg_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <stdint.h>
#include <string.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_color_convert.h"
Expand Down
4 changes: 2 additions & 2 deletions ext/image_coders/png/png_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include <string.h>
#include <png.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_color_convert.h"
Expand Down
5 changes: 2 additions & 3 deletions ext/image_coders/psx_image_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
#include <string.h>

#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"
Expand Down
2 changes: 1 addition & 1 deletion ext/image_coders/psx_image_modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions ext/image_coders/webp/webp_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <stdint.h>
#include <string.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_color_convert.h"
Expand Down
10 changes: 5 additions & 5 deletions include/picasso_image.h → include/images/psx_image.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* \file picasso_image.h
* \file psx_image.h
* \author Zhang Ji Peng <[email protected]>
* \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.
Expand All @@ -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"

Expand Down Expand Up @@ -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_*/
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* \file picasso_image_plugin.h
* \file psx_image_plugin.h
* \author Zhang Ji Peng <[email protected]>
* \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.
Expand All @@ -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" {
Expand Down Expand Up @@ -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_*/
5 changes: 3 additions & 2 deletions include/include.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# Copyright (C) 2024 Zhang Ji Peng
# Contact: [email protected]

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)

2 changes: 1 addition & 1 deletion test/image_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <unistd.h>
#define DIRPREFIX "/"
#endif
#include "picasso_image.h"
#include "psx_image.h"

static char full_path[1024];

Expand Down
2 changes: 1 addition & 1 deletion test/image_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <string.h>

#include "../include/picasso.h"
#include "../include/picasso_image.h"
#include "../include/images/psx_image.h"
#include "drawFunc.h"
#if defined(WIN32)
#include <direct.h>
Expand Down

0 comments on commit 19d9549

Please sign in to comment.