Re: [patch] gqview 2.1 and FUJI raw files (.raf)

"Daniel M. German" <dmgerman-a84/LA3/[email protected]> Sun, 15 May 2005 14:53:08 -0700
Newsgroups gmane.comp.gnome.apps.gqview.devel
Message-ID <[email protected]>

 John> For the EXIF parser I do not mind adding support for additional
 John> file formats that also use EXIF. And looking at the way you
 John> simply point the image loader to jpeg data embedded within the
 John> raw file - I am starting to agree that this is an acceptable
 John> approach.

John, this will be fantastic. You might remember that around 1.5 years
ago I suggested implementing support for Canon RAW files. You
indicated that you preferred that support be added at the gdk level.

I followed your advice and I was able to implement a gdk loader for
Canon, but it had some serious disadvantages: it assumes the file is
read from a medium where no SEEK to previous parts is available (sort
of like a pipe). This is very good for formats that do not need to
seek to a previous part of the file (like JPEG). But Canon RAW has its
metadata at the end, so one needs to read the end to be able to know
where the embedded JPEG is. I "solved" the problem by buffering (in
disk) the file, the problem, of course, is that it is terribly slow
(it could also be solved by memory buffering, but at the GDK level
you never know how many files you will be opening at the same time,
and I thought it was a waste of memory)

http://turingmachine.org/~dmg/libdcraw/gqview-gdk-draw-support-20040324.png


I have the code that is able to "find" the location of the embedded
jpeg in Canon RAW files (both CRW and CR2s), and it is under the GPL
(see http://turingmachine.org/~dmg/libdcraw/). I can happily
contribute this code to gqview.

One challenge, though, is that in CRW files, the photo info is not
EXIF compatible.

 John> The only missing element at this point is adding an additional
 John> filter to support the extensions used by the raw file
 John> format(s). For Fuji is this always "*.raf" or are there
 John> variants ?


Canon uses CR2 and CRW. CRW is easily identifiable by its file's
header. It contains: HEAPCCDR as the first 8 bytes.

CR2 files are trickier. They are TIFFs envelopes (sorry if I am using
the wrong name). 

But both embed a decent size JPG in each of the files. I have
utilities that extract those JPEGs, if anybody is interested.

dmg



--
Daniel M. German                  "All the fun of sitting still, being quiet,
   Principal Skinner (Simpsons) -> writing down numbers, yes science has it all.""
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

 


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click