[Rawstudio-dev] adding full exif support

Anders Brander anders at brander.dk
Sat Apr 12 12:10:09 CEST 2008


Hi,

On Sat, 2008-04-12 at 00:16 +0100, Rafael Espíndola wrote:
> I am using rawstudio and I love it. I have one or two ideas for
> improvements. The one I want the most is the ability to write exif
> info on the generated jpegs.

The difficult task is to somehow decide which data to save and which
not. Some make sense in a processed image, some doesn't. But it should
be entirely possible to add.

What are the other idea? ;)

> I noticed ufraw uses exiv2. I am planning on writing a patch to
> rawstudio that does the same. Is someone working on that already? Any
> pointers?

I don't think that anyone is working at it. You're very welcome to have
a go!

exiv2 is c++ right? That isn't a big problem, since be already depends
on g++, but it's something to consider.

You probably want to look at:

rs_init_filetypes(): Here every supported filetype gets added and
function pointers initialized. To take Canon cr2 images for example:

rs_add_filetype("cr2", FILETYPE_RAW, ".cr2", _("Canon CR2"),
 rs_photo_open_dcraw, rs_tiff_load_thumb, rs_tiff_load_meta, NULL);

rs_photo_open_dcraw is a function pointer to a function, that will open
cr2-images. I believe we only use dcraw and gdk for opening images.

rs_tiff_load_thumb is a function that loads the thumbnail from the file
(or cached on disk).

rs_tiff_load_meta is where you could start, it tries to load different
metadata from the rawfile. This would be an ideal place to load all EXIF
metadata, we have the RS_METADATA structure, where we could add EXIF
data.

rs_photo_save(): This is the function that saves every supported
filetype. This would be an ideal place to save EXIF-data combined with
the rs_jpeg_save() in rs-jpeg.c.

/abrander





More information about the Rawstudio-dev mailing list