google-code-export / thebigpicture

Automatically exported from code.google.com/p/thebigpicture
1 stars 1 forks source link

IFD an IPTC handling should be unified #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The data in IFD and IPTC structures show great similarity;
- each consists of multiple records
- each record has multiple tags, each with it's own name and number
(although in IPTC records may re-use numbers)
- each tag is encoded in a certain data types (may be more than one in IFD)
- each should have methods to get and change tags

Yet the classes for both structures differ quite wildly and offer a
different approach. IFD derives a class for each kind of record, while IPTC
only uses such classes to store some info about tag names, numbers and data
types.

These classes should follow the same structure, and can probably share a
lot of code.

Original issue reported on code.google.com by p.edel...@gmail.com on 18 Mar 2007 at 10:41

GoogleCodeExporter commented 9 years ago
I don't know yet when we get around to it.

Original comment by p.edel...@gmail.com on 18 Mar 2007 at 10:42

GoogleCodeExporter commented 9 years ago
There's one small but important difference: the different IFD records are 
separate
entities, while the different IPTC records all reside in the same entity (they 
record
number is specified before each tag). Therefore, all IPTC info can be parsed in 
one
single swoop, but IFD information can't.

Original comment by p.edel...@gmail.com on 22 Mar 2007 at 5:56

GoogleCodeExporter commented 9 years ago
Another problem is in the genrality; in the current implementation, the IFD 
class is
a general IFD class, while the IPTC class relies on the tables in the same 
file. This
makes the IPTC approach less flexible.

Original comment by p.edel...@gmail.com on 22 Mar 2007 at 5:58

GoogleCodeExporter commented 9 years ago
A common structure might look like this:
- A class which contains information about the records.
- A record class containing information about the tags.

The first class has the methods to get and set a tag name or number in all the
segments, by asking each record class if it has that tag and delegating the 
getting
and setting to them.

This issue should be fixed before issue 15 can be fixed, so in v1-alpha1.

Original comment by p.edel...@gmail.com on 23 Mar 2007 at 5:30

GoogleCodeExporter commented 9 years ago
This is now implemented in the following way:
- A common class for a record within a larger structure, with methods to get 
and set
data (metainfofile.MetaInfoRecord).
- A common class for a meta-information block, like Exif of IPTC/NAA data
(metainfofile.MetaInfoBlock).

In it's current form, both an IFD and an IPTC record derive from 
MetaInfoRecord. The
larger structures are formed by the exif.Exif and IPTCNAA.IPTC classes.

Original comment by p.edel...@gmail.com on 31 Mar 2007 at 5:04

GoogleCodeExporter commented 9 years ago
This should be ok now -> closed.

Original comment by p.edel...@gmail.com on 31 Mar 2007 at 10:03