comparison src/image.c @ 844:efed9a1520d6

implemented generic FileData cache use it for caching decoded exif data
author nadvornik
date Wed, 18 Jun 2008 22:26:52 +0000
parents fb249b8e63e4
children 8911a4f0e56c
comparison
equal deleted inserted replaced
843:add46f9c895c 844:efed9a1520d6
533 } 533 }
534 534
535 535
536 if (!imd->cm) image_post_process_alter(imd, clamp); 536 if (!imd->cm) image_post_process_alter(imd, clamp);
537 537
538 exif_free(exif); 538 exif_free_fd(fd, exif);
539 #endif 539 #endif
540 } 540 }
541 541
542 static void image_post_process_tile_color_cb(PixbufRenderer *pr, GdkPixbuf **pixbuf, gint x, gint y, gint w, gint h, gpointer data) 542 static void image_post_process_tile_color_cb(PixbufRenderer *pr, GdkPixbuf **pixbuf, gint x, gint y, gint w, gint h, gpointer data)
543 { 543 {
729 { 729 {
730 ExifData *exif = NULL; 730 ExifData *exif = NULL;
731 731
732 if (imd->color_profile_use_image) exif = exif_read_fd(imd->image_fd); 732 if (imd->color_profile_use_image) exif = exif_read_fd(imd->image_fd);
733 // image_post_process_color(imd, imd->prev_color_row, exif, TRUE); 733 // image_post_process_color(imd, imd->prev_color_row, exif, TRUE);
734 exif_free(exif); 734 exif_free_fd(imd->image_fd, exif);
735 } 735 }
736 success = TRUE; 736 success = TRUE;
737 } 737 }
738 else 738 else
739 { 739 {
1326 /* fixme: note error to user */ 1326 /* fixme: note error to user */
1327 // image_state_set(imd, IMAGE_STATE_COLOR_ADJ); 1327 // image_state_set(imd, IMAGE_STATE_COLOR_ADJ);
1328 } 1328 }
1329 } 1329 }
1330 1330
1331 exif_free(exif); 1331 exif_free_fd(imd->image_fd, exif);
1332 1332
1333 if (imd->cm || imd->desaturate) 1333 if (imd->cm || imd->desaturate)
1334 pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, image_post_process_tile_color_cb, (gpointer) imd, (imd->cm != NULL) ); 1334 pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, image_post_process_tile_color_cb, (gpointer) imd, (imd->cm != NULL) );
1335 1335
1336 image_state_set(imd, IMAGE_STATE_IMAGE); 1336 image_state_set(imd, IMAGE_STATE_IMAGE);