When an image is captured, the capturing device often writes special information about the image into the file - EXIF metadata. Those metadata may contain such information as camera parameters during capturing, date and time of the capturing, photographer's name, etc. It can even contain GPS information.
Also, there is one more metadata format named IPTC. It is widely used in journalism to keep such information about a photo as byline, subject, location, etc.
The server, where you upload images to, often uses these metadata. For example, some photo labs require EXIF metadata to provide higher results during printing, or you may also need to get exact date and time of the image creation, etc. So you may wonder how Image Uploader works with EXIF and IPTC metadata.
Image Uploader supports the following features:
Image Uploader Express and Standard do not allow preserving EXIF metadata when creating thumbnails. See the Comparison of Express, Standard, and Professional Versions topic for details.
You can make Image Uploader send resized (as well as rotated) images instead of originals. However, you may wonder what happens with EXIF and IPTC metadata when you perform imaging operations with Image Uploader. It is especially important when you process uploaded images with some specific software, e.g. for printing them at photo labs.
Fortunately, you can preserve EXIF and IPTC metadata using the
UploadThumbnail#CopyExif and
UploadThumbnail#CopyIptc properties, where
# is the number of the thumbnail. Just set a property of the
appropriate thumbnail to true
. Here is a code sample for doing it.
<script type="text/javascript" src="iuembed.js"> </script> <script type="text/javascript"> var iu = new ImageUploaderWriter("ImageUploader", 710, 500); //...Any other params... iu.addParam("UploadThumbnail1FitMode", "Fit"); iu.addParam("UploadThumbnail1Width", "1024"); iu.addParam("UploadThumbnail1Height", "1024"); iu.addParam("UploadThumbnail1JpegQuality", "70"); iu.addParam("UploadThumbnail1CopyExif", "true"); iu.addParam("UploadThumbnail1CopyIptc", "true"); //... iu.writeHtml(); </script>
If EXIF or IPTC metadata is not essential to you, we recommend you to set these properties to
false
. This will make uploaded thumbnails a bit smaller.
Sometimes it is more convenient to extract EXIF or/and IPTC details at the client side and send them along with other upload fields. For example, if the only EXIF data you need is a capture date, you may send it as a separate field and discard all other EXIF information. This way instead of extracting this piece of data from the uploaded file (some special server-side component is required for this), you may just get it from the submitted request.
To extract EXIF and IPTC details, use the ExtractExif ExtractIptc properties respectively. You should set these properties to strings which contain necessary EXIF and IPTC field names separated with semicolons.
<script type="text/javascript" src="iuembed.js"> </script> <script type="text/javascript"> var iu = new ImageUploaderWriter("ImageUploader", 710, 500); //...Any other params... iu.addParam("ExtractExif", "ExifDateTime;ExifOrientation;ExifModel"); iu.addParam("ExtractIptc", "IptcCredit;IptcHeadline"); //... iu.writeHtml(); </script>
These fields will be uploaded to the server as POST variables named in the following way:
XXX_N
, where XXX
is the string value specified in
this property (EXIF or IPTC field name), and N
is the number of the file in the request.
If the uploaded field contains a multiple string value each string will be separated using a sequence specified with the
MetaDataSeparator. For example, if the IptcKeyword
field contains several keywords: portrait
, old photo
,
black and white
, and the MetaDataSeparator property is
set to ";"
the IptcKeyword_1
POST field will contain the
"portrait;old photo;black and white"
value.
All date/time values have the following format: YYYY:MM:DD hh:mm:ss
. For example, May 11, 2006,
2:40PM would be represented as: 2006:05:11 14:40:00
.
One more EXIF-related property, AllowAutoRotate, makes Image Uploader rotate thumbnails automatically, if needed. The decision, whether to rotate a thumbnail or not, is based on the EXIF metadata, which are extracted from the source images. Just like manual rotation, automatic rotation is applied to thumbnails only.
Though it may be convenient, remember that not all cameras recognize orientation properly. Also, reading EXIF data slows down the process of folder scanning, and if the folder contains a lot of images, the decrease in speed may be noticeable.
To enable automatic rotation, initialize Image Uploader as in the example below.
<script type="text/javascript" src="iuembed.js"> </script> <script type="text/javascript"> var iu = new ImageUploaderWriter("ImageUploader", 710, 500); //...Any other params... iu.addParam("AllowAutoRotate", "true"); //... iu.writeHtml(); </script>