Browse Source

* removed image_display -- it's useless if we have image_save.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/pwntcha/trunk@427 92316355-f0b4-4df1-b90c-862c8a59935f
master
sam 20 years ago
parent
commit
26bbb901b1
2 changed files with 0 additions and 23 deletions
  1. +0
    -1
      src/common.h
  2. +0
    -22
      src/image.c

+ 0
- 1
src/common.h View File

@@ -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);


+ 0
- 22
src/image.c View File

@@ -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
}


Loading…
Cancel
Save