git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@427 92316355-f0b4-4df1-b90c-862c8a59935fmaster
| @@ -35,7 +35,6 @@ struct image *image_load(const char *name); | |||||
| struct image *image_new(int width, int height); | struct image *image_new(int width, int height); | ||||
| void image_free(struct image *img); | void image_free(struct image *img); | ||||
| void image_save(struct image *img, const char *name); | void image_save(struct image *img, const char *name); | ||||
| void image_display(struct image *img); | |||||
| int getgray(struct image *img, int x, int y, int *g); | int getgray(struct image *img, int x, int y, int *g); | ||||
| int getpixel(struct image *img, int x, int y, int *r, int *g, int *b); | int getpixel(struct image *img, int x, int y, int *r, int *g, int *b); | ||||
| int setpixel(struct image *img, int x, int y, int r, int g, int b); | int setpixel(struct image *img, int x, int y, int r, int g, int b); | ||||
| @@ -200,25 +200,3 @@ int setpixel(struct image *img, int x, int y, int r, int g, int b) | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| void image_display(struct image *img) | |||||
| { | |||||
| #if defined(HAVE_SDL_IMAGE_H) | |||||
| //Nothing to do here | |||||
| #elif defined(HAVE_IMLIB2_H) | |||||
| //char name[BUFSIZ]; | |||||
| //static int i = 0; | |||||
| //sprintf(name, "image%i-%ix%i.png", i++, img->width, img->height); | |||||
| //imlib_context_set_image(img->priv); | |||||
| //imlib_save_image(name); | |||||
| //fprintf(stderr, "saved to %s\n", name); | |||||
| #elif defined(HAVE_CV_H) | |||||
| char name[BUFSIZ]; | |||||
| sprintf(name, "Image %p (%i x %i)", img, img->width, img->height); | |||||
| cvNamedWindow(name, 0); | |||||
| cvShowImage(name, img->priv); | |||||
| cvResizeWindow(name, img->width * 2, img->height * 2 + 50); | |||||
| while((unsigned char)cvWaitKey(0) != 0x1b) | |||||
| ; | |||||
| #endif | |||||
| } | |||||