View Single Post
  #10  
Old February 13th 20, 02:14 PM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Mayayana
external usenet poster
 
Posts: 6,438
Default Does the .png image format have a text metadata field?

"J. P. Gilliver (John)" wrote

| Not really; I only wanted a free-form text area (a "Comment" field if
| you like). Exif Pilot does seem to give me that - _and_ fixed fields for
| assorted dates, and other things, which _implies_ that those are in fact
| set down in the format. Are you saying they're not?
|
| Is there a general format for an EXIF "block", which the various image
| file formats - .jpg, .png, etc.- just form a "wrapper" for? I had
| assumed not, i. e. that each image file format had its own (some
| optional) blocks, at least for things like photograph details (camera
| model, date taken, lens and "film" settings, shutter speed, and so on).

Each format is entirely different. Embedded metadata is mainly the
invention of Adobe. Then it was useful and became standardized
through use. But it's still not entirely standard. And EXIF data is not
required for the format. Meanwhile, everyone and his brother have
made up their own tags. Microsoft even created tags with unicode
strings, breaking the rule everyone else follows. But it's their
tag and it's an open standard. So whether this stuff is official
depends mostly on how many people use it.

JPG metadata is popular mainly because people want to tag
their photos from Sally's wedding, and because journalists want
to infest their photos with official copyright data, not realizing
that data is not actually part of the image data but only an
optional addition to the file header that can be easily removed.

In general, file formats include a header and data. The header
IDs the file type and can include a lot more info in some cases.
But the only required parts are the parts that allow the file data
to be interpreted as intended.

These image files are raster images, which means they're all
bitmaps. All of them store data that can be unpacked to provide
a gridwork of pixel values in order to render the image. A BMP
is little more that that data in a long string. You could actually
count down into the file, if you wanted to, to find the RGB pixel
values of the pixel at 300,400 offset from the top right corner.

A TIF is usually just a BMP that's been zipped. GIF, JPG, PNG all
use different methods to compress the data and all have unique
pros and cons. But they're all ways to package a bitmap.

If you look at the link you'll see a PNG is somewhat unusual. The
header, such as it is, is only a few bytes IDing the file type. What's
usually called the "file magic". The rest is blocks of data with identifying
bytes. PNGs also come in a large number of types. It's a very
complex format. And since there's no simple rule for putting metadata
in a header, as there is for JPG, it's a more difficult task.


Ads