source: libpipi/trunk/pipi/pipi_internals.h @ 2605

Last change on this file since 2605 was 2605, checked in by Sam Hocevar, 12 years ago
  • Big API reorganisation. Now libpipi can transparently convert between colour spaces for a given image. For instance, if pipi_gaussian_blur is applied to a 32-bpp image, it is automatically converted to gamma-corrected 32-bit floats beforehands, then converted back to normal.
  • TODO: clipping, regions of interest, more formats, getpixel macros...
File size: 1.7 KB
Line 
1/*
2 *  libpipi       Proper image processing implementation library
3 *  Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org>
4 *                All Rights Reserved
5 *
6 *  $Id$
7 *
8 *  This library is free software. It comes without any warranty, to
9 *  the extent permitted by applicable law. You can redistribute it
10 *  and/or modify it under the terms of the Do What The Fuck You Want
11 *  To Public License, Version 2, as published by Sam Hocevar. See
12 *  http://sam.zoy.org/wtfpl/COPYING for more details.
13 */
14
15/*
16 *  pipi_internals.h: internal types
17 */
18
19#ifndef __PIPI_INTERNALS_H__
20#define __PIPI_INTERNALS_H__
21
22/* pipi_image_t: the image structure. This is probably going to be the most
23 * complex structure in the library, but right now it only has fairly normal
24 * stuff, like width and height and pointers to pixel areas. */
25struct pipi_image
26{
27    int w, h, pitch;
28    pipi_format_t codec_format, last_modified;
29
30    /* List of all possible pixel formats */
31    pipi_pixels_t p[PIPI_PIXELS_MAX];
32
33    /* Private data used by the codec */
34    void *codec_priv;
35};
36
37#ifdef USE_IMLIB2
38pipi_image_t *pipi_load_imlib2(const char *name);
39pipi_image_t *pipi_new_imlib2(int width, int height);
40void pipi_free_imlib2(pipi_image_t *img);
41void pipi_save_imlib2(pipi_image_t *img, const char *name);
42#endif
43
44#ifdef USE_OPENCV
45pipi_image_t *pipi_load_opencv(const char *name);
46pipi_image_t *pipi_new_opencv(int width, int height);
47void pipi_free_opencv(pipi_image_t *img);
48void pipi_save_opencv(pipi_image_t *img, const char *name);
49#endif
50
51#ifdef USE_SDL
52pipi_image_t *pipi_load_sdl(const char *name);
53pipi_image_t *pipi_new_sdl(int width, int height);
54void pipi_free_sdl(pipi_image_t *img);
55void pipi_save_sdl(pipi_image_t *img, const char *name);
56#endif
57
58#endif /* __PIPI_INTERNALS_H__ */
59
Note: See TracBrowser for help on using the repository browser.