Ticket #1742 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Enhancement. Add metadata for PNG, GIF and JPG

Reported by: rouault Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

This patch adds the following features :

  • for BMP, PNG, GIF and JPG, read projection ref from a .prj (adds a ReadProjectionRefFromFile? in GDALDataset class)
  • for PNG, GIF and JPEG, supports read and write of geo transform, projection ref and datasets metadata in the image file itself (using tEXT for PNG, APPLICATION_EXT_FUNC_CODE extension for GIF89a and a custom marker section for JPG)

(It's a bit intersection on previous patches from mine, #1734 and #1467)

Attachments

gdal_svn_gifjpgbmppng.patch Download (44.6 KB) - added by rouault 4 years ago.

Change History

Changed 4 years ago by rouault

Changed 4 years ago by rouault

  • version changed from unspecified to svn-trunk
  • component changed from default to GDAL_Raster

Changed 4 years ago by rouault

  • type changed from defect to enhancement

Changed 4 years ago by warmerdam

Even,

I'm iffy on this patch because it seems to duplicate some of what is accomplished by the PAM mechanism (persistent auxilary metadata in an .aux.xml file). It also doesn't fallback to letting the PAM mechanism operate if no metadata is found in the file itself so it can't be applied as is.

The goal here is to introduce a gdal specific metadata storage format for each of these formats - is that right?

I'd like to hold this for future consideration.

Changed 4 years ago by rouault

I wasn't aware of the PAM mechanism...

Yes, the goal was to introduce a gdal specific metadata storage format for each of these formats. The idea is that people have a tendency to forget auxiliary files and just copy/paste the main interest file. So, when the format allows to store metadata in it, it could be interesting to do it.

But I agree with you this may be a kind of "gadget" and not enough scalable. At least, the patch should allow fallback to the PAM mechanism.

Note: See TracTickets for help on using tickets.