您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

74 行
1.8 KiB

  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. * pipi.h: the full libpipi public API
  16. */
  17. #ifndef __PIPI_H__
  18. #define __PIPI_H__
  19. #ifdef __cplusplus
  20. extern "C"
  21. {
  22. #endif
  23. /* pipi_format_t: this enum is a list of all possible pixel formats for
  24. * our internal images. RGBA32 is the most usual format when an image has
  25. * just been loaded, but RGBA_F is a lot better for complex operations. */
  26. typedef enum
  27. {
  28. PIPI_PIXELS_RGBA32 = 0,
  29. PIPI_PIXELS_RGBA_F = 1,
  30. PIPI_PIXELS_MAX = 2
  31. }
  32. pipi_format_t;
  33. /* pipi_pixels_t: this structure stores a pixel view of an image. */
  34. typedef struct
  35. {
  36. void *pixels;
  37. int w, h, pitch;
  38. }
  39. pipi_pixels_t;
  40. /* pipi_image_t: the main image type */
  41. typedef struct pipi_image pipi_image_t;
  42. extern pipi_image_t *pipi_load(const char *);
  43. extern pipi_image_t *pipi_new(int, int);
  44. extern void pipi_free(pipi_image_t *);
  45. extern void pipi_save(pipi_image_t *, const char *);
  46. extern pipi_pixels_t *pipi_getpixels(pipi_image_t *, pipi_format_t);
  47. extern pipi_image_t *pipi_resize(pipi_image_t *, int, int);
  48. extern pipi_image_t *pipi_gaussian_blur(pipi_image_t *, float);
  49. extern pipi_image_t *pipi_gaussian_blur_ext(pipi_image_t *,
  50. float, float, float, float);
  51. extern void pipi_dither_24to16(pipi_image_t *);
  52. extern void pipi_test(pipi_image_t *);
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif /* __PIPI_H__ */