Mercurial > geeqie.yaz
comparison src/image-load.c @ 43:ee03f36e9e4b
Sun May 15 21:40:26 2005 John Ellis <johne@verizon.net>
* format_raw.[ch]: New files to parse image data and exif offsets for
the raw camera formats.
* exif.c, image-load.c: Add support calls to format_raw.c functions
above.
* filelist.c: Add Fujifilm raw file extension to known formats.
* thumb_standard.c (thumb_loader_std_start): Check for existing
thumbnail file before checking for a failure mark.
* src/Makefile.am: Add format_raw.[ch].
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
##### an offical release when making enhancements and translation updates. #####
author | gqview |
---|---|
date | Mon, 16 May 2005 01:49:51 +0000 |
parents | 25335c62cd9b |
children | 7cfa60beda76 |
comparison
equal
deleted
inserted
replaced
42:606fcf461a68 | 43:ee03f36e9e4b |
---|---|
11 | 11 |
12 | 12 |
13 #include "gqview.h" | 13 #include "gqview.h" |
14 #include "image-load.h" | 14 #include "image-load.h" |
15 | 15 |
16 #include "format_raw.h" | |
16 #include "ui_fileops.h" | 17 #include "ui_fileops.h" |
17 | 18 |
18 #include <fcntl.h> | 19 #include <fcntl.h> |
19 | 20 |
20 | 21 |
208 | 209 |
209 static gint image_loader_begin(ImageLoader *il) | 210 static gint image_loader_begin(ImageLoader *il) |
210 { | 211 { |
211 guchar buf[IMAGE_LOADER_BUFFER_SIZE]; | 212 guchar buf[IMAGE_LOADER_BUFFER_SIZE]; |
212 int b; | 213 int b; |
214 unsigned int offset = 0; | |
213 | 215 |
214 if (!il->loader || il->pixbuf) return FALSE; | 216 if (!il->loader || il->pixbuf) return FALSE; |
215 | 217 |
216 b = read(il->load_fd, &buf, sizeof(buf)); | 218 b = read(il->load_fd, &buf, sizeof(buf)); |
217 | 219 |
219 { | 221 { |
220 image_loader_stop(il); | 222 image_loader_stop(il); |
221 return FALSE; | 223 return FALSE; |
222 } | 224 } |
223 | 225 |
224 if (gdk_pixbuf_loader_write(il->loader, buf, b, NULL)) | 226 format_raw_img_exif_offsets(il->load_fd, buf, b, &offset, NULL); |
227 | |
228 if (gdk_pixbuf_loader_write(il->loader, buf + offset, b - offset, NULL)) | |
225 { | 229 { |
226 il->bytes_read += b; | 230 il->bytes_read += b; |
227 | 231 |
228 if (b < sizeof(buf)) | 232 if (b < sizeof(buf)) |
229 { | 233 { |