Re: Maker data
Pavel Zlatovratskii <[email protected]> Mon, 27 Feb 2017 18:58:34 +0300
| Newsgroups | gmane.comp.graphics.png.general |
|---|---|
| Organization | TB.Budget |
| Message-ID | <[email protected]> |
27.02.2017 4:58, John Bowler пишет:
> Well, that's what an EXIF library handles, just as lcms handles
> interdependencies in ICC profiles.
Yes... and no.
Let's suppose we have EXIF like(all data and offset are only
theoretical, most features of EXIF absent):
Exif header:
Width: 320
Height: 240
Color space: sRGB
Copyright: 5 bytes at offset 50(relative to EXIF header start)
MakerNote: 100 bytes at offset 70(relative to EXIF header start)
..other tags...
data at offset 50:Pavel...
data at offset 70:
Canon IFD:
camera settings: array at offset 100(relative to EXIF header start!!!)
data at offset 100(30 to MakerNote):
1(MacroMode): Macro
2: some value or 0
3(Quality):Normal
4(Flash):Not fired
5(Continuous):Continuous
6: some value or 0
7(Focus): Manual
...
We can't move MakerNote data as our library may be unable to read|write
Canon MakerNote.
If we want to add new tags we should move some data between tag list and
MakerNote start to the end of EXIF. In example: move "Copyright" to
offset more than 170.
In pure theory it's possible that we want to add tags and there is no
place to add them before MakerNote start. Then it will be impossible to
add tags without risk to break MakerNote.
And you may note that such tricks like "freeze MakerData and place rest
of EXIF around it" is not simple to implement. That's why most EXIF
libraries only handle known MakerNote (which is not very good idea as
anyone may design new format tomorrow) or ignore that MakerNote may rely
on it's offset and copy it like simple bytes.
I just move that idea a bit further by constructing structure which join
(original) offset, byteorder and format designer with bytes.
> However if you separate parts of
> the EXIF data into separate chunks there is no way of preventing a
> *valid* PNG application deleting or, possibly, modifying the relevant
> values.
>
Yes, of course. And as MakerNote is usually designed as very low
relevant to other EXIF values I want to allow PNG application to modify
EXIF, keeping MakerNote intact.
--
Have a nice DOS.
Pavel Zlatovratskii [email protected]; [email protected]
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
png-mng-misc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/png-mng-misc