Changeset 427
- Timestamp:
- Jan 5, 2005, 10:17:18 PM (18 years ago)
- Location:
- pwntcha/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pwntcha/trunk/src/common.h
r426 r427 36 36 void image_free(struct image *img); 37 37 void image_save(struct image *img, const char *name); 38 void image_display(struct image *img);39 38 int getgray(struct image *img, int x, int y, int *g); 40 39 int getpixel(struct image *img, int x, int y, int *r, int *g, int *b); -
pwntcha/trunk/src/image.c
r416 r427 201 201 } 202 202 203 void image_display(struct image *img)204 {205 #if defined(HAVE_SDL_IMAGE_H)206 //Nothing to do here207 #elif defined(HAVE_IMLIB2_H)208 //char name[BUFSIZ];209 //static int i = 0;210 //sprintf(name, "image%i-%ix%i.png", i++, img->width, img->height);211 //imlib_context_set_image(img->priv);212 //imlib_save_image(name);213 //fprintf(stderr, "saved to %s\n", name);214 #elif defined(HAVE_CV_H)215 char name[BUFSIZ];216 sprintf(name, "Image %p (%i x %i)", img, img->width, img->height);217 cvNamedWindow(name, 0);218 cvShowImage(name, img->priv);219 cvResizeWindow(name, img->width * 2, img->height * 2 + 50);220 while((unsigned char)cvWaitKey(0) != 0x1b)221 ;222 #endif223 }224
Note: See TracChangeset
for help on using the changeset viewer.