From: Jan P. <pa...@pi...> - 2006-01-25 16:49:52
|
Aha, I now see how it works for TIFFs: 1) exif_loader_write_file() loads 1024 bytes 2) exif_loader_write() stores first 1012 bytes of them (because of "eld->size = len;" just after "eld->data_format = EL_DATA_FORMAT_TIFF;") 3) exif_loader_write_file stops reading. Then those 1012 are assumed to be EXIF data. Consequences: a) It doesn't read real EXIF tag, but primary TIFF IFD b) It is assumed EXIF is at the beginning of the file c) it is assumed the IFD has at most 1012 bytes I know dealing with TIFF/EXIF isn't easy e.g. because EXIF data can be located anywhere in the file, but I just wanted to be sure this is what you intended.... -- Jan > Hi, > > Here is a patch I had around for almost 6 monthes: > > I have implemented TIFF support for libexif, and I have also sanitized > the exif_data_save_data() to save pure EXIF data. > exif_data_save_data() is being renamed to exif_data_save_data_jpeg() and > exif_data_save_data_raw() implements the same without the "Exif\0" > marker for JPEG chunks. > exif_data_sava_data() still behave as previously, but is marked as > deprecated. For compatibility only. I have changed the .so version > consequently. > > If someone can review it, but please don't commit it. I'll do IT myself > with the appropriate ChangeLog if it is OK. > > Thanks. > > Hub |