Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.c: core library routines
  16. */
  17. #include "config.h"
  18. #include "common.h"
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <string.h>
  22. #include "pipi.h"
  23. #include "pipi_internals.h"
  24. /*
  25. static int init = 0;
  26. void _pipi_init(void)
  27. {
  28. if(init)
  29. return;
  30. _pipi_init_pixels();
  31. }
  32. */
  33. pipi_image_t *pipi_new(int w, int h)
  34. {
  35. pipi_image_t *img;
  36. img = malloc(sizeof(pipi_image_t));
  37. memset(img, 0, sizeof(pipi_image_t));
  38. img->w = w;
  39. img->h = h;
  40. img->last_modified = PIPI_PIXELS_UNINITIALISED;
  41. return img;
  42. }