You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 regels
1.5 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. typedef struct pipi_image pipi_image_t;
  24. extern pipi_image_t *pipi_load(const char *name);
  25. extern pipi_image_t *pipi_new(int width, int height);
  26. extern pipi_image_t *pipi_copy(const pipi_image_t *img);
  27. extern void pipi_free(pipi_image_t *img);
  28. extern void pipi_save(pipi_image_t *img, const char *name);
  29. extern int pipi_getgray(pipi_image_t const *img, int x, int y, int *g);
  30. extern int pipi_getpixel(pipi_image_t const *img,
  31. int x, int y, double *r, double *g, double *b);
  32. extern int pipi_setpixel(pipi_image_t *img, int x, int y,
  33. double r, double g, double b);
  34. extern pipi_image_t *pipi_resize(pipi_image_t const *, int, int);
  35. extern pipi_image_t *pipi_gaussian_blur(pipi_image_t const *, float);
  36. extern void pipi_dither_24to16(pipi_image_t *img);
  37. extern void pipi_test(pipi_image_t *);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* __PIPI_H__ */