How to add metadata to an image?

Where do you insert metadata into the image file and how is this done? I want to do this with php.

+6
php image metadata
source share
5 answers

Php integration in images;)

http://bechtsoudis.com/archive/2011/09/08/php-code-into-jpeg-metadata-from-hide-to-unhide/index.html

JPEG, TIFF, PSD, Raw, and several other file formats can include any or all of the following standard metadata types:

IPTC-IIM Often called the “hereditary” IPTC, this scheme was developed in the early 1990s, primarily to assist news organizations in subtitling early digital images. Its main advantage is that most editing and image management programs can read and write their widely compatible fields.

IPTC Core and Extension This new scheme is based on the MIM heritage, adding more types of descriptive and administrative information, including new fields to meet the needs of the photography community and cultural heritage, packaged in the more robust XMP data format.

PLUS The universal image licensing system for identifying and determining licenses for the use of images describes a scheme and tools for generating a string of characters that can identify the copyright owner, user, scope and terms of use of the licensed image.

XMP This is a new data format used by IPTC Core and Extension to store and access image metadata. It allows you to store metadata in an image file or in a sidecar accompanying file and allows you to create custom metadata fields.

Exif This metadata, which is often created by cameras and other capture devices, includes technical information about the image and its capture method, such as exposure settings, capture time, GPS location information and camera model.

Dublin core Many image libraries and a wide range of industries store information with image files using this scheme. Some of its fields are compatible with IPTC formats.

+4
source share

You can use image libraries like imagemagick

http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=20183

There is another tool that I know by the name of Jhead, which can save and modify some metadata if the images

http://www.sentex.net/~mwandel/jhead/

+2
source share

You can use the iptcembed function in PHP to add information to the image. usage can be found at: http://php.net/manual/en/function.iptcembed.php

Added data can be obtained using the iptcparse function.

Let me know if this works for you.

+1
source share

I recently posted a very interesting w3c blog article about combining RDFa and HTML <imagemap> to enrich images by indicating not only what is in the image, but where it is in the image: http://www.w3.org/QA /2008/01/rdfa_and_html_imagemap.html

0
source share

In PHP you can use headers:

Example:

  header('Content-Length: ' . filesize($file)); /// that the file size 

You can add more headers like this and it will work. You can even send some custom headers and it will work anyway.

0
source share

All Articles