From: Roberto Costa <roberto.costa@en...> - 2003-08-26 21:38:00
> (1) (drop): Not very nice.
> (2) (keeping memory regions): This could work. You would save an array
> of buffers together with the original offsets in the ExifData and try to
> rearrange those buffers on exif_data_save_to_data at their original
This should always be possible, because even the offset of IFD0 within
exif information can be arbitrarily specified. It's usually 0x8, I just
hope no camera assumes it is 0x8 without reading the value...
> I have just (seconds before receiving your e-mail) committed some
> changes to libmnote to make it possible to pass EXIF data (instead of
> only MakerNote data) to mnote_data_new_from_data. I had in mind that
> - mnote_data_new_from_data reads all interesting bytes into
> memory (like libexif does with EXIF data)
> - mnote_data_save_to_data writes all MakerNote data into one ExifEntry.
> That is, if you
> - read the EXIF data,
> - then the MakerNote data,
> - save the MakerNote data and
> - store the buffer in the corresponding entry in the EXIF data and
> - finally save the EXIF data,
> this would be like a defragmentation.
> But we can do both: Adding an array of memory regions and (optionally)
> giving the user the possibility of defragmentation through libmnote.
Yes, I agree.
When libmnote provides libexif with the knowledge about the maker notes,
libexif can safely modify a file and compact/defragment it at the same
Otherwise (libexif compiled without libmnote support, or libmnote that
doesn't recognize the maker notes of some manifacturer... or is just not
installed) it's necessary to follow the much more conservative behavior
> How about that? Do you have time to work on implementing the detection
> of unused buffers?
I'm happy to work on it, I will probably have little time before Friday,
but I should be able to produce something by Monday.