Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

67 rader
1.9 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_internals.h: internal types
  16. */
  17. #ifndef __PIPI_INTERNALS_H__
  18. #define __PIPI_INTERNALS_H__
  19. /* pipi_image_t: the image structure. This is probably going to be the most
  20. * complex structure in the library, but right now it only has fairly normal
  21. * stuff, like width and height and pointers to pixel areas. */
  22. struct pipi_image
  23. {
  24. int w, h, pitch;
  25. int wrap;
  26. pipi_format_t codec_format, last_modified;
  27. /* List of all possible pixel formats */
  28. pipi_pixels_t p[PIPI_PIXELS_MAX];
  29. /* Private data used by the codec */
  30. void *codec_priv;
  31. };
  32. struct pipi_context
  33. {
  34. int nimages;
  35. pipi_image_t *images[1024]; /* FIXME: do dynamic allocation */
  36. };
  37. #ifdef USE_IMLIB2
  38. pipi_image_t *pipi_load_imlib2(const char *name);
  39. pipi_image_t *pipi_new_imlib2(int width, int height);
  40. void pipi_free_imlib2(pipi_image_t *img);
  41. void pipi_save_imlib2(pipi_image_t *img, const char *name);
  42. #endif
  43. #ifdef USE_OPENCV
  44. pipi_image_t *pipi_load_opencv(const char *name);
  45. pipi_image_t *pipi_new_opencv(int width, int height);
  46. void pipi_free_opencv(pipi_image_t *img);
  47. void pipi_save_opencv(pipi_image_t *img, const char *name);
  48. #endif
  49. #ifdef USE_SDL
  50. pipi_image_t *pipi_load_sdl(const char *name);
  51. pipi_image_t *pipi_new_sdl(int width, int height);
  52. void pipi_free_sdl(pipi_image_t *img);
  53. void pipi_save_sdl(pipi_image_t *img, const char *name);
  54. #endif
  55. #endif /* __PIPI_INTERNALS_H__ */