Home
Contents

Sophisticated Rename manual

Prev Page Next Page
 

Working with EXIF JPEG and TIFF files.

 

What you should know about EXIF before you start changing it.
Working in standard SR mode (process with SR).
Working in EXIV2 mode (process with EXIV2).
Using Exif Viewer.
Restoring original file names of Canon photos.
Restoring original file names of Olympus photos.

 

What you should know about EXIF before you start changing it.

The following part is "boring reading" and it is supposed to be read by photo-geeks only. The others may skip it and go to the summary (bold-italic text).

Exif is an allocated part of an image file containing some technical information. The most of Exif writers are digital cameras. Exif contains such information as date and time of shooting, ISO, shutter speed, aperture, flash state and other parameters of shooting.

Why should you ever need exif? Because of the possibility to keep short text information right inside the photo. Of course, you can keep notes in an external file, but if you take the photo to another place, your information will become unreachable. At the same time, any comments that you add right to the exif part of the photo will be available anywhere where your photo is used. What info can be added? People find it useful to describe the place where the photo was taken, add copyrights, etc.

What risks are involved? The producers of Exif manipulation software don't like to talk about it but we don't want to mislead you - you have to know the truth before you start your experiments. Exif is a rather complicated structure and it's not easy to modify it correctly. The software needs to recalculate all offsets and it's not always possible to do it correctly (there are a few dozens of camera manufacturers and each of them has their own MakerNote format). If the offsets are calculated incorrectly, some tags may be lost, some values may be changed, but in any case, the new exif won't resemble the original. It may cause a lot of problems if you decide to reupload the image back to the camera (it's sometimes handy to show photos to friends using the camera's LCD screen or you just may want to view photos on a TV screen if your camera allows to do it). Anyway, if you change the exif structure, the camera may deny the image. During the development of SR Exif Updater, a lot of exif software was tested. There were several different tests and each of these programs showed unsatisfied results at least in one of the tests (the problems range from the incompliance with the exif standard to tag losses and value changes). Here is the result of testing images after adding a new 100-char Image Description tag (camera: Canon PowerShot A80, other cameras may be less forgiving!).

Software\Test
File size
Reads photo*
Reads params*
Other issues
Original Canon image
54,693
+
+
 
ACDSee
54,580
+
-
Always kills MakerNote - even when nothing was really changed.
Adobe PhotoShop CS
59,765
+
-
Always recompresses the image - inevitable quality losses.
Exifer
61,147
+
+
Raw exif looks very strange, and so does the file size. Functionally the file is good.
ExifUtils
54,593
+
-
Generally, it's a good utility, but it has failed in this test.
Exiv2
54,632
+
+
Functionally the file is OK. The tool is "alive", so all bugs are eliminated as soon as they are found. It's our choice.

* Reads photo - the camera could understand the image format and show it on the screen. Reads params - the camera could also show shooting details (Aperture, Shutter Speed, Flash, Macro Mode, Image Quality, etc).

You can see that changing exif offsets is quite a dangerous game, that's why the decision was made: SR won't change the structure of exif and all offsets will remain the same to keep the original compatibility. This decision implies some limitations on what you can do in the Exif Updater (you cannot add non-existing tags and you cannot add values longer than the existing tag buffer permits). To further enchance the possibilities of Exif Updater, there exists Exiv2 support. Exiv2 is a freeware tool that allows you to add non-existing tags and set the values of any length to existing tags by means of recalculating exif offsets. Please note that there exists possibility to lose backward compatibility with your camera if you use Exiv2 to add or edit tags (although it showed acceptable results in our tests).

Summary: SR doesn't change the structure of original exif and the image itself to preserve the compatibility of the photos with the camera, it only replaces already existing values. New values of existing tags cannot be longer than the original ones. Non-existing tags cannot be created. If you want to create new tags or replace short values of existing tags with longer ones, you should use Exiv2 mode. The work in Exiv2 mode is the same as in SR mode, you won't see any difference. To enable Exiv2 mode, you should install Exiv2 to the same folder, where Sophisticated Rename is installed. Exiv2 recalculates exif offsets and may deny the compatibility of your photos with some originating cameras, although the compatibility is preserved in most cases. To put it simple, it you want to preserve the maximum compatibility, use SR mode only, if you don't care about the compatibility with the originating camera or work with images that don't have Exif yet, it's recommended to use Exiv2 mode.

 

Working in standard SR mode (process with SR).

All Exif values can be saved and loaded with the help of 2 small buttons on the right-bottom part of the window.

Define new values: this set of parameters allow you to set fixed values of datetime tags. Before you start the processing, you should check the parameters to change, if a parameter is not ticked, it remains the same as it was in the original file.

Relative: this parameter allows you to adjust time if your camera's clock was incorrectly set or if you forgot to adjust it for daylight saving changes. To adjust the time backwards, use negative values. For instance, if you made a photo today and set "-1" (days), the exif will show yesterday's date. H:M:S - hours, minutes, seconds.

It can also be used if your camera resets the clock when you remove the batteries. Example: the clock was reset to "1st of January 2000, 12:00:00" when the first picture was taken and you know that the picture was taken when it was "3rd of August 2004, 19:26:34". You click the lightning button and enter these values. The program calculates that the difference is 1676 days, 7 hours, 26 mins and 34 secs. All the following date/time values will be calculated automatically, for example, if the wrong date of the next picture is "1st of January 2000, 12:03:18", it will be automatically changed to "3rd of August 2004, 19:29:52".

Make selected dates and times equal: this parameter allows you to correct a date changed by a photo editor. Some software often change "datetime" field to the time of editing. If you want to change all dates so that they all refer to the date of shooting, use "Make selected dates and times equal datetime original". You can also update file date/time values. "Make selected date and time equal" uses already altered values if "define new values" or "relative changes" is also used with this feature.

If the status of the operation is "done, but with errors", at least one file didn't have exif metadata or there was no date field in the exif. Check exif via "tools->exif viewer".

Exif update/remove: set to "update" if you want to modify some tags in Exif; set to "remove" if you want to completely delete the exif part from the photos. Exif can contain 3-10kb of data and it's not recommended to keep it in the images that you are going to upload to your website. Deleting exif from 100 small images may reduce their total size from 1 megabyte to 200 kb (on average), thus increasing the loading speed of your webpages five-fold. The exif can be removed either by SR or Exiv2, you can use whatever you like.

Method: you can update only one file or all checked files in the file list. Only the checked files will be processed. You will see 'will be skipped' in the status if the file is unchecked.

Advanced Exif Tags: generally, it's not recommended to change these tags in original photos, but if you are certain to do it, we won't stop you :-). As it was mentioned before, SR can only replace existing tags with new values of the same length. To learn the length of original values in a file, select the file in the drop-down listbox and click [Read] button. The file will be read and existing tags will be filled in the window. Above the edit lines you will see the size of the buffer allocated for each tag. You can enter the same number of chars or less, but you cannot exceed this length. If you see "0", it means that this tag doesn't exist and you cannot assign any value to it. If you are preparing a batch process with images downloaded from different cameras, you should analyze all photos before updating the exif. The [Analyze] button allows you to gather stats from all checked files in the file list. The statistics include the total number of files, the number of files with exif and the number of files with certain tags. It's not recommended to start the process if not all files have exif records becuase files without exif will not be updated. The analyzer also shows the minimal size of certain tags in all checked files. For example, if the lenght of Canon "Make" tag is 5 and the length of Olympus "Make" Tag is 23, the Analyzer will show "5" so you will be able to understand that any text exceeding 5 chars in length will be cut in some files (for example, "NewMaker" will remain "NewMaker" in Olympus images and become "NewMa" in Canon images).

Tags:

User comment: This tag is rather useful because most camera manufacturers keep a special buffer in the exif up to 255 chars in size and it is accessible using this tag. If the tag exists, you may safely use it the way you want.

Image Description: this tag is more often saved by photo software and rarely added by cameras. If it exists, feel free to use it.

Artist and Copyright tags: saved mostly by software. They are useful for photos that you are going to upload to internet. Artist - the photographer who made the photo, Copyright - the holder of copyright. These tags almost never created by cameras.

Make: this tag represents the name of the camera manufacturer. If you change the value of this tag many exif viewers will be unable to decode MakerNote tag correctly. If you don't care about ISO, white balance, macro, etc, - you have one more tag to store your data! Do not change it if you want to reupload the image back to the camera later.

Model: the model of the camera. Actually, nobody cares about the value of this tag, but do not change it if you want to reupload the image back to the camera later.

Custom tags: you can specify up to 3 custom tags that you would like to change. SR saves values as strings, so you should be sure that you change ascii values only. To find out the name of a tag, use Exif Viewer. The name will be shown before "=", for example, if Exif Viewer shows "InteroperabilityIndex = R98", then the name of the tag is "InteroperabilityIndex". Custom tags give you more freedom: as DateTime, DateTimeOriginal, DateTimeDigitized are ascii tags, instead of setting fixed values of all files, you may simply set up a few SR variables or conditions that will provide specific datetime values for every single file!

SR datatypes as tag values: SR Exif Updater supports all SR datatypes in "advanced tags" edit controls. For example, if you want to automatically add file names for all files to ImageDescription tag, you should write not "C:\Pics\mypic.jpg" but "*XVR FILE NAME" in the ImageDescription edit field.

 

Working in EXIV2 mode (process with EXIV2).

You will be able to use this mode only if you install Exiv2 to the same folder where SR is installed. Usually it is "C:\Program Files\Sophisticated Rename". Exiv2 is a good thing to add tags to images that don't have exif metadata at all - in this case you have nothing to lose - no need to recalculate offsets because a brand new exif header is created. Nevertheless, you can also use Exiv2 with the photos that already have exif. Using Exiv2 you may add tag values of any length, even if the new length exceeds the length of existing values.

SR uses Exiv2 to work with string tags only (UC, ID, AU, CO, MA, MO, C1, C2, C3), the datetime tags are adjusted by SR even if you work in the Exiv2 mode. If it happens that datatime tags don't exist in the exif, check "Also add non-existing datetime tags" - this will add "datetime", "datetime taken" and "datetime digitized" tags. The values for these tags will be taken from "file created" file date. If the exif already has some of datetime tags, they will not be overwritten. To set specific datatime values, use 3 custom fields (the names of the tags are Exif.Image.DateTime, Exif.Photo.DateTimeOriginal, Exif.Photo.DateTimeDigitize, the format is "YYYY:MM:DD HH:MM:SS").

The work in the Exiv2 mode is similar to that in SR mode with the exception that you must specify the full names of the tags. It's not recommended to modify non-ascii tags.

Tag
Type
Tag description
Exif.Image.NewSubfileType
Long
A general indication of the kind of data contained in this subfile.
Exif.Image.ImageWidth
Long
Image width
Exif.Image.ImageLength
Long
Image height
Exif.Image.BitsPerSample
Short
Number of bits per component
Exif.Image.Compression
Short
Compression scheme
Exif.Image.PhotometricInterpretation
Short
Pixel composition
Exif.Image.FillOrder
Short
The logical order of bits within a byte
Exif.Image.DocumentName
Ascii
The name of the document from which this image was scanned
Exif.Image.ImageDescription
Ascii
Image title
Exif.Image.Make
Ascii
Manufacturer of image input equipment
Exif.Image.Model
Ascii
Model of image input equipment
Exif.Image.StripOffsets
Long
Image data location
Exif.Image.Orientation
Short
Orientation of image
Exif.Image.SamplesPerPixel
Short
Number of components
Exif.Image.RowsPerStrip
Long
Number of rows per strip
Exif.Image.StripByteCounts
Long
Bytes per compressed strip
Exif.Image.XResolution
Rational
Image resolution in width direction
Exif.Image.YResolution
Rational
Image resolution in height direction
Exif.Image.PlanarConfiguration
Short
Image data arrangement
Exif.Image.ResolutionUnit
Short
Unit of X and Y resolution
Exif.Image.TransferFunction
Short
Transfer function
Exif.Image.Software
Ascii
Software used
Exif.Image.DateTime
Ascii
File change date and time
Exif.Image.Artist
Ascii
Person who created the image
Exif.Image.WhitePoint
Rational
White point chromaticity
Exif.Image.PrimaryChromaticities
Rational
Chromaticities of primaries
Exif.Image.SubIFDs
Long
Defined by Adobe Corporation to enable TIFF Trees within a TIFF file.
Exif.Image.TransferRange
Short
Expands the range of the TransferFunction
Exif.Image.JPEGProc
Long
This field indicates the process used to produce the compressed data
Exif.Image.JPEGInterchangeFormat
Long
Offset to JPEG SOI
Exif.Image.JPEGInterchangeFormatLength
Long
Bytes of JPEG data
Exif.Image.YCbCrCoefficients
Rational
Color space transformation matrix coefficients
Exif.Image.YCbCrSubSampling
Short
Subsampling ratio of Y to C
Exif.Image.YCbCrPositioning
Short
Y and C positioning
Exif.Image.ReferenceBlackWhite
Rational
Pair of black and white reference values
Exif.Image.XMLPacket
Byte
XMP Metadata (Adobe technote 9-14-02)
Exif.Image.CFARepeatPatternDim
Short
Contains two values representing the minimum rows and columns to define the repeating patterns of the color filter array
Exif.Image.CFAPattern
Byte
Indicates the color filter array (CFA) geometric pattern of the image sensor when a one-chip color area sensor is used. It does not apply to all sensing methods
Exif.Image.BatteryLevel
Rational
Contains a value of the battery level as a fraction or string
Exif.Image.IPTCNAA
Long
Contains an IPTC/NAA record
Exif.Image.Copyright
Ascii
Copyright holder
Exif.Image.ImageResources
Undefined
Contains information embedded by the Adobe Photoshop application
Exif.Image.ExifTag
Long
Exif IFD Pointer
Exif.Image.InterColorProfile
Undefined
Contains an InterColor Consortium (ICC) format color space characterization/profile
Exif.Image.GPSTag
Long
GPSInfo IFD Pointer
Exif.Image.TIFFEPStandardID
Byte
Contains four ASCII characters representing the TIFF/EP standard version of a TIFF/EP file
Exif.Photo.ExposureTime
Rational
Exposure time
Exif.Photo.FNumber
Rational
F number
Exif.Photo.ExposureProgram
Short
Exposure program
Exif.Photo.SpectralSensitivity
Ascii
Spectral sensitivity
Exif.Photo.ISOSpeedRatings
Short
ISO speed ratings
Exif.Photo.OECF
Undefined
Optoelectric coefficient
Exif.Photo.ExifVersion
Undefined
Exif Version
Exif.Photo.DateTimeOriginal
Ascii
Date and time original image was generated
Exif.Photo.DateTimeDigitized
Ascii
Date and time image was made digital data
Exif.Photo.ComponentsConfiguration
Undefined
Meaning of each component
Exif.Photo.CompressedBitsPerPixel
Rational
Image compression mode
Exif.Photo.ShutterSpeedValue
SRational
Shutter speed
Exif.Photo.ApertureValue
Rational
Aperture
Exif.Photo.BrightnessValue
SRational
Brightness
Exif.Photo.ExposureBiasValue
SRational
Exposure bias
Exif.Photo.MaxApertureValue
Rational
Maximum lens aperture
Exif.Photo.SubjectDistance
Rational
Subject distance
Exif.Photo.MeteringMode
Short
Metering mode
Exif.Photo.LightSource
Short
Light source
Exif.Photo.Flash
Short
Flash
Exif.Photo.FocalLength
Rational
Lens focal length
Exif.Photo.SubjectArea
Short
Subject area
Exif.Photo.MakerNote
Undefined
Manufacturer notes
Exif.Photo.UserComment
Comment
User comments
Exif.Photo.SubSecTime
Ascii
DateTime subseconds
Exif.Photo.SubSecTimeOriginal
Ascii
DateTimeOriginal subseconds
Exif.Photo.SubSecTimeDigitized
Ascii
DateTimeDigitized subseconds
Exif.Photo.FlashpixVersion
Undefined
Supported Flashpix version
Exif.Photo.ColorSpace
Short
Color space information
Exif.Photo.PixelXDimension
Long
Valid image width
Exif.Photo.PixelYDimension
Long
Valid image height
Exif.Photo.RelatedSoundFile
Ascii
Related audio file
Exif.Photo.InteroperabilityTag
Long
Interoperability IFD Pointer
Exif.Photo.FlashEnergy
Rational
Flash energy
Exif.Photo.SpatialFrequencyResponse
Undefined
Spatial frequency response
Exif.Photo.FocalPlaneXResolution
Rational
Focal plane X resolution
Exif.Photo.FocalPlaneYResolution
Rational
Focal plane Y resolution
Exif.Photo.FocalPlaneResolutionUnit
Short
Focal plane resolution unit
Exif.Photo.SubjectLocation
Short
Subject location
Exif.Photo.ExposureIndex
Rational
Exposure index
Exif.Photo.SensingMethod
Short
Sensing method
Exif.Photo.FileSource
Undefined
File source
Exif.Photo.SceneType
Undefined
Scene type
Exif.Photo.CFAPattern
Undefined
CFA pattern
Exif.Photo.CustomRendered
Short
Custom image processing
Exif.Photo.ExposureMode
Short
Exposure mode
Exif.Photo.WhiteBalance
Short
White balance
Exif.Photo.DigitalZoomRatio
Rational
Digital zoom ratio
Exif.Photo.FocalLengthIn35mmFilm
Short
Focal length in 35 mm film
Exif.Photo.SceneCaptureType
Short
Scene capture type
Exif.Photo.GainControl
Rational
Gain control
Exif.Photo.Contrast
Short
Contrast
Exif.Photo.Saturation
Short
Saturation
Exif.Photo.Sharpness
Short
Sharpness
Exif.Photo.DeviceSettingDescription
Undefined
Device settings description
Exif.Photo.SubjectDistanceRange
Short
Subject distance range
Exif.Photo.ImageUniqueID
Ascii
Unique image ID
Exif.Iop.InteroperabilityIndex
Ascii
Interoperability Identification
Exif.Iop.InteroperabilityVersion
Undefined
Interoperability version
Exif.Iop.RelatedImageFileFormat
Ascii
File format of image file
Exif.Iop.RelatedImageWidth
Long
Image width
Exif.Iop.RelatedImageLength
Long
Image height
Exif.GPSInfo.GPSVersionID
Byte
GPS tag version
Exif.GPSInfo.GPSLatitudeRef
Ascii
North or South Latitude
Exif.GPSInfo.GPSLatitude
Rational
Latitude
Exif.GPSInfo.GPSLongitudeRef
Ascii
East or West Longitude
Exif.GPSInfo.GPSLongitude
Rational
Longitude
Exif.GPSInfo.GPSAltitudeRef
Byte
Altitude reference
Exif.GPSInfo.GPSAltitude
Rational
Altitude
Exif.GPSInfo.GPSTimeStamp
Rational
GPS time (atomic clock)
Exif.GPSInfo.GPSSatellites
Ascii
GPS satellites used for measurement
Exif.GPSInfo.GPSStatus
Ascii
GPS receiver status
Exif.GPSInfo.GPSMeasureMode
Ascii
GPS measurement mode
Exif.GPSInfo.GPSDOP
Rational
Measurement precision
Exif.GPSInfo.GPSSpeedRef
Ascii
Speed unit
Exif.GPSInfo.GPSSpeed
Rational
Speed of GPS receiver
Exif.GPSInfo.GPSTrackRef
Ascii
Reference for direction of movement
Exif.GPSInfo.GPSTrack
Rational
Direction of movement
Exif.GPSInfo.GPSImgDirectionRef
Ascii
Reference for direction of image
Exif.GPSInfo.GPSImgDirection
Rational
Direction of image
Exif.GPSInfo.GPSMapDatum
Ascii
Geodetic survey data used
Exif.GPSInfo.GPSDestLatitudeRef
Ascii
Reference for latitude of destination
Exif.GPSInfo.GPSDestLatitude
Rational
Latitude of destination
Exif.GPSInfo.GPSDestLongitudeRef
Ascii
Reference for longitude of destination
Exif.GPSInfo.GPSDestLongitude
Rational
Longitude of destination
Exif.GPSInfo.GPSDestBearingRef
Ascii
Reference for bearing of destination
Exif.GPSInfo.GPSDestBearing
Rational
Bearing of destination
Exif.GPSInfo.GPSDestDistanceRef
Ascii
Reference for distance to destination
Exif.GPSInfo.GPSDestDistance
Rational
Distance to destination
Exif.GPSInfo.GPSProcessingMethod
Undefined
Name of GPS processing method
Exif.GPSInfo.GPSAreaInformation
Undefined
Name of GPS area
Exif.GPSInfo.GPSDateStamp
Ascii
GPS date
Exif.GPSInfo.GPSDifferential
Short
GPS differential correction

Relating lesson: Lesson-J.

 

Using Exif Viewer.

Exif Viewer is a trully powerful exif analyzing tool. It allows to filter out only those tags that are of interest to you. You can save tag lists to files and then load them again.

The drop-down listbox contains 250 widely used tags, but your camera is likely to support only some of them. Press [Enter] to add the selected item to the listbox. You can also drag and drop items in the listbox to change their places; doubleclick to delete an item.

If you request a tag that doesn't exist in the exif metadata, it will be skipped in the report. Moreover, you can request tags from maker specific data. Different camera manufacturers have different tags, so you should read complete info to learn what tags are available for you. For example, this is a part of a report concerning Canon PowerShot images:

FirmwareVersion = "Firmware Version 1.00"
ImageNumber = 1363688
OwnerName = "Anatoliy Kovalenko"

If you need to sort out only image numbers, you have to select "ImageNumber" with the mouse and press [Enter] to add it to the tag list (as it was already mentioned, the dorp-down listbox doesn't contain tag names from maker specific data).

 

Restoring original file names of Canon photos.

Tested with Canon PowerShot A80 and Canon EOS 300D.

If you renamed Canon images (no matter what program you used to do it and how long ago you did it), you can still restore original file names in the format "IMG_1234.JPG". This may be useful if you want to upload the files back to the camera to see them on a TV screen. The only thing that is important is the presense of full EXIF including maker note (the image and folder numbers are encoded in the ImageNumber tag). The included preset "restore powershot name" will recreate the original Canon folder structure and restore original names, all you have to do is specify the drive letter of your CF cardreader before the processing (it will be requested automatically), for example, if you enter F, the images will be renamed like this:

F:\DCIM\182CANON\IMG_8243.JPG
F:\DCIM\183CANON\IMG_8303.JPG
...

Please note that the files will be moved to another drive. If you want to preserve the originals on the old place, you should duplicate your photos to other location and run the preset with the duplicates. If you only want to rename photos without moving them to the CF card, delete all but two last items from the template and turn off "Custom Paths" checkbox.

 

Restoring original file names of Olympus photos.

Tested with Olympus Camedia C-220Z.

It's quite problematic to restore original file names because Olympus doesn't write it to exif. Still, you can restore a part of original name and make the file name look as if it was original. The generic Camedia file name is as follows: "PXYYZZZZ.JPG".

P - a constant.
X - encoded month: January through September are expressed by the numbers 1 through 9, October by the letter A, November by B and December by C.
YY - day, from 01 to 31.
ZZZZ - serial numbers of image files run from 0001 to 9999.

It's possible to get day and month from exif, but it's impossible to restore original file number, so ZZZZ in this example has nothing to do with the original file name, it is generated by a SR counter.

The camera writes files to folders according to the following rule: serial numbers of folders run from 100 to 999, when file number 9999 is reached, a new folder is created and assigned the next number. So the examples of folders are "100olymp", "234olymp", "999olymp", etc. Regretfully, it's also impossible to restore the original number of the folder, but it's not really needed. You can create a folder with any number on your flash card drive and copy the properly renamed images to this folder - the camera should see the photos. Although possible, it's not recommended to process more than 9999 files from one folder.

Go to the main page.