Picasso API  2.2
picasso_image_plugin.h
Go to the documentation of this file.
00001 
00018 #ifndef _PICASSO_IMAGE_PLUGININ_INTERFACE_H_
00019 #define _PICASSO_IMAGE_PLUGININ_INTERFACE_H_
00020 
00021 #include "picasso.h"
00022 #include "picasso_image.h"
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00044 typedef struct _psx_image_header {
00046     void* priv;
00048     int width;
00050     int height;
00052     int pitch;
00054     int depth;
00056     int bpp;
00058     int format;
00060     int alpha;
00062     int frames;
00063 }psx_image_header;
00064 
00069 typedef struct _psx_image_operator {
00071     int (*read_header_info)(const ps_byte* data, size_t data_len, psx_image_header* header);
00073     int (*decode_image_data)(psx_image_header* header, psx_image_frame* frame, int idx, ps_byte* buffer, size_t buffer_len);
00075     int (*release_read_header_info)(psx_image_header* header);
00077     int (*write_header_info)(const psx_image* image, image_writer_fn func,
00078                                          void* param, float quality, psx_image_header* header);
00080     int (*encode_image_data)(psx_image_header* header, psx_image_frame* frame, int idx, const ps_byte* buffer, size_t buffer_len, int* ret);
00082     int (*release_write_header_info)(psx_image_header* header);
00083 }psx_image_operator;
00084 
00089 typedef enum _psx_priority_level {
00091     PRIORITY_EXTENTED = -1,
00093     PRIORITY_DEFAULT  = 0,
00095     PRIORITY_MASTER   = 1,
00096 }psx_priority_level;
00097 
00120 PEXPORT int psx_image_register_operator(const char* type, const ps_byte* signature, size_t sig_len,
00121                                                      psx_priority_level level, psx_image_operator* coder);
00122 
00133 PEXPORT int psx_image_unregister_operator(psx_image_operator* coder);
00134 
00148 PEXPORT void psx_image_module_init(void);
00149 
00156 PEXPORT void psx_image_module_shutdown(void);
00157 
00162 #define MODULE_NAME  1
00163 
00175 PEXPORT const char* psx_image_module_get_string(int id);
00176 
00181 #ifdef __cplusplus
00182 }
00183 #endif
00184 
00185 #endif /*_PICASSO_IMAGE_PLUGININ_INTERFACE_H_*/
00186