rpbissonnette / thebigpicture

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

It should be possible to load Exif object from memory or as an empty object #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the exif.Exif class needs a file pointer and offset to be
initialized. However, it should also be possible to load it from a memory
buffer or as a new, empty object.

Inheriting from datablock.DataBlock might seem the obvious answer for the
memory loading problem, but there are some complications. An Exif block
contains all the individual IFD's, so a copy should be made of the buffer
for each different IFD (it's not even possible to copy only a part, since
we don't know at with location in the buffer the actual data is stored).

A solution for this might be to let the Exif object have a DataBlock,
rather than being a DataBlock.

Original issue reported on code.google.com by p.edel...@gmail.com on 4 May 2007 at 6:23

GoogleCodeExporter commented 9 years ago
This is solved in revision 56-57. DataBlock now uses a buffer object instead of 
a
string, so we can simply juggle around pointers. As an added bonus, it should be
faster too.

Original comment by p.edel...@gmail.com on 7 May 2007 at 9:11