Picasso API  2.2
Data Structures | Defines | Typedefs | Enumerations | Functions
picasso_image.h File Reference
#include "picasso.h"

Go to the source code of this file.

Data Structures

struct  _psx_image_frame
 A frame image data. More...
struct  _psx_image
 A image object. More...

Defines

#define IMG_OBJ(image)   IMG_OBJ_AT_INDEX(image, 0)
 Get first ps_image obj.
#define IMG_DATA(image)   IMG_DATA_AT_INDEX(image, 0)
 Get first image frame data.
#define IMG_DATA_SIZE(image)   IMG_DATA_SIZE_AT_INDEX(image, 0)
 Get first image frame data size.
#define IMG_OBJ_AT_INDEX(image, idx)   (image->frames[idx].img)
 Get ps_image obj at index.
#define IMG_DATA_AT_INDEX(image, idx)   (image->frames[idx].data)
 Get image frame data at index.
#define IMG_DATA_SIZE_AT_INDEX(img, idx)   (img->frames[idx].size)
 Get image frame data size at index.
#define IMG_DURATION_AT_INDEX(img, idx)   (img->frames[idx].duration)
 Get image frame duration at index.

Typedefs

typedef struct _psx_image_frame psx_image_frame
 A frame image data.
typedef struct _psx_image psx_image
 A image object.
typedef int(* image_writer_fn )(void *param, const ps_byte *data, size_t length)
 Callback function for saving image data.

Enumerations

enum  {
  S_OK = 0, S_BAD_PARAMS = 1, S_NOT_SUPPORT = 2, S_OUT_OF_MEMORY = 3,
  S_INIT_FAILURE = 4, S_FAILURE = 5
}
 Status code return by call APIs. More...

Functions

PEXPORT int PICAPI psx_image_init (void)
 Initialze the library and load resources.
PEXPORT int PICAPI psx_image_shutdown (void)
 Release resources and shutdoen.
PEXPORT psx_image *PICAPI psx_image_create_from_data (ps_byte *data, ps_color_format fmt, int width, int height, int pitch, int *err_code)
 Create a new psx_image using a copy of given address in memory.
PEXPORT psx_image *PICAPI psx_image_load (const char *file_name, int *err_code)
 Create a new psx_image object and load from file.
PEXPORT psx_image *PICAPI psx_image_load_from_memory (const ps_byte *data, size_t length, int *err_code)
 Create a new psx_image object and load data from memory.
PEXPORT int PICAPI psx_image_save (const psx_image *image, image_writer_fn func, void *param, const char *type, float quality)
 Encoding psx_image to a gaving format and output it.
PEXPORT int PICAPI psx_image_save_to_file (const psx_image *image, const char *file_name, const char *type, float quality)
 Encoding psx_image to a gaving format and output to a file.
PEXPORT int PICAPI psx_image_destroy (psx_image *image)
 Destroy the psx_image object and release resources.

Detailed Description

Author:
Zhang Ji Peng <onecoolx@gmail.com>
Date:
2012/1/31

This file includes all interfaces of picasso extended image decoders.


    Copyright (C) 2008 ~ 2016  Zhang Ji Peng

    All rights reserved.

    Picasso is a vector graphic library.

 

Definition in file picasso_image.h.