Introduction

You were surely disappointed when reading this error message when opening a photo in Photolab.
The message states that it is the camera rather than the photo that is not supported. We will see how to make Photolab believe it was taken with a compatible device by disguising the photo.

Content and limits of the tutorial

PhotoLab is a sophisticated editor that uses the information contained in photos. By making it believe that the photo from an incompatible device comes from a supported device, PhotoLab reads information and applies optimizations that do not necessarily correspond to the camera that created the photo

The result may be unsuitable, at worst unreadable. It’s up to the user to find out the right substitute camera, and assume the disadvantages of this method for a lack of anything better.



A bit of technique

A digital photo file does not only contain the image, it also contains textual and mathematical data arranged in a specific format, the metadata.

For the explanation we have used an example photo in DNG format, but the disguise method can be applied to other image formats.

A standardized photo file in DNG format is structured as follows:
* The header contains the description of the structure
* Several data substructures
– EXIF, This is the historical information block, which can be found in almost all photo formats
– XMP usually contains the same information. XMP is better structured, it contains identifying tags which improve the compatibility of the photo
* Mathematical data on color profile and curve
* Data on the interpretation of the photo
* Two preview images in JPEG format, original size and one thumbnail
* The demosaiced photo (linear DNG)
* OR the raw photo of the sensor in proprietary raw format

The EXIF and XMP structures contain the two pieces of information that will allow us to make-up our photos.
* Make which indicates the brand of the device
* Model which corresponds to the model of the device, we will have guessed it




There are dozens of tags in the XMP structure that PhotoLab will use to optimize the rendering of the photo. Some are standard and others are specific to the device used. Each manufacturer introduces their own information into the XMP structure and we do not know if it is interpreted or ignored by PhotoLab.




Make-up process

Make-up consists of modifying the value of two metadata fields. We do them with the ExifTool tool.

ExifTool

ExifTool (link) is a small free program available for Windows, Mac OS and Linux / Unix. Exiftool does not have a GUI and runs in console mode. There are graphical interfaces, to be installed separately.

Performance and limitations

DNG files aren’t the only ones that contain metadata. ExifTool supports around 200 types: Canon, Nikon, Sony, JPEG but also doc, pdf, etc.

The current version of ExifTool recognizes 24,286 structure tags. (Link to list)
ExifTool allows you to edit all tags … and even add custom tags. It is therefore a very powerful tool, the usefulness of which goes well beyond the scope of this tutorial.

There are two methods to run ExifTool.
– One using the native ExifTool accessible via the console.
– The other using a graphical interface on top of ExifTool.

ExifToolGUI is a graphical interface that uses the basic ExifTool tool. It is also free software.
ExiftoolGUI does not offer all the functionality of ExifTool but is sufficient for the task at hand. Also, it is significantly slower than the Console version.


This tutorial was done on Windows 10 version 21H1 using ExifTool version 12.29 and ExiftoolsGUI version 5.16

1- Use with ExifToolGUI

– Select the file, in the browser window (central).
The information is displayed on the right (see screenshot)


– We see here that the samsung_galaxy_s7_edge_samples_raw.dng file contains the Make = Samsung and Model = SM-G953F tags.
A search on Google shows that SM-G953F is a Samsung Galaxy S7 edge
– View the list of models supported by Photolab, to see that the Galaxy S7 is not in the list
– Choose a replacement model from the list. Try several models with similar characteristics
If you choose a Hasselblad X1D II 50C as a replacement for a Galaxy S7 it might give funny results 🙂
– Obtain a photo of the chosen model.
For recent cameras https: /www.photographyblog.com/,
For older things https:/www.rawsamples.ch/index.php/en/
It doesn’t have to be a DNG, the important thing is the presence of the Exif “Make” and “Model” tags.


– Copy the values of “Make” and “Model” in NotePad
– Select the photo to edit
– Click the “Workspace” button at the top right
– Click the “Make” tag
– Paste the corresponding value from the replacement file
– Validate and save (“Save” button). Value has been changed
Repeat the three last operations on the “Model” tag


The photo is now disguised and can be opened by PhotoLab.


2- Using ExifTool in console mode

Console keyboard commands are shown in courier characters.


– On Windows the console opens by default to the user’s folder


– In our configuration, our photos are on d :, type d: and Enter
– Change folder to get to the folder containing the photos. Cd command followed by the path to the folder here cd \ examples
– List the files in the folder with the dir command. You should see something similar to this:



– To see the “Make” and “Model” of the two files type, the command ExifTool -l -Model -make * .dng
which means: “For each .dng file (* means all) ExifTool displays the value of Make and Model”.


– Check the list of models supported by Photolab, to note that the Galaxy S7 is not in the list
– Choose a replacement model from the list.
Try between several models with similar characteristics
– Obtain a photo of the chosen model.
It doesn’t have to be a DNG, the important thing is the presence of EXIFs
– View the “Make” and “Model” of RAW_SAMSUNG_GX20.DNG
– Type, the command
ExifTool -l -model -make RAW_SAMSUNG_GX20.DNG


– Note the values.
If necessary, use Notepad to prepare the next command
– To apply them to the two incompatible files type
ExifTool -m -Model = "SAMSUNG DIGITAL IMA" -make = "SAMSUNG GX20" * .dng
The -m option allows to  ignore minor errors.


It is now possible to open these photos in Photolab.


To process an entire folder, all you have to do is indicate its name instead of the file name:
ExifTool -m -Model ="SAMSUNG DIGITAL IMA" -make="SAMSUNG GX20" d:\exemples\

Conclusion

Changing the content of the “Make” and “Model” metadata is very easy. The difficulty is to choose the right values.
Here are some tips from our experiences.

* We have obtained best results choosing the same “Make” rather than a camera  value with similar characteristics  but a different “Make” value.
We only act on the value of “Model” towards a camera with different characteristics.
An example is more telling: It is better to replace a
Make “Samsung”, Model “SM-G935F” (Galaxy Egde 7) by a
Make “Samsung DIGITAL IMA”, Model “SAMSUNG GX20” (Reflex) than by Make “Apple”, Model “iPhone S7” with optical characteristics however closer.

* Some raw encodings are not standard, in this case opening in PhotoLab will be impossible or degraded.

For example opening a raw file from a Xiaomi Note 10 Pro using a Make and Model tag with the values ​​”Samsung DIGITAL IMA”and“ SAMSUNG GX20” shows a very poor quality raw image.
It is even impossible to open using Apple values ​​generating an error message “Internal error (RAW2RGBTransform_prepare) failed” in Photolab (it also crashes PhotoShop)

Installing ExifTool for Windows

There are two ways to install ExifTool.

* In stand-alone mode, just unzip this file https://ExifTool.org/ExifTool-12.28.zip
* In classic installation mode with this file in 64 bits or 32 bits. For other choices see https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows.
By default in this mode the installation is done in “C:\Users\” my_name “\ AppData\Local\Programs\ ExifTool”.
The tool can be accessed from any folder.

Installation of ExifToolGUI

The graphical interface works in stand-alone mode. There is no installation to do, just unzip https://ExifTool.org/gui/ExifToolgui516.zip and double-click on ExifToolGUI.exe.



We have not encountered this problem on the laptop; a whim of Windows 10 !?

ExifTool for MacOs

There are two methods to run ExifTool.
– One using native terminal-based ExifTool
– The other using a GUI on top of ExifTool

There are two GUIs for ExifTool running under MacOS.
– SetExifToolGUI is a shareware limited to 5 files for the free version.

Get the full version with a Paypal donation of a minimum of 10 €
– jExifToolGUI is free software

This tutorial is based on ExifTool version 12.29 and jExifToolGUI version 1.8.1. It has been tested on MacOS Catalina.

JExiftToolGUI runs in the presence of ExifTool, the console-based version.


Using jExifToolGUI

– Start jExifToolGUI.


Allows you to load a folder. Dragging and dropping a folder does not work.
Allows you to load one or more files. It is also possible to drag and drop files into the Photo window.
Click to display the image in full screen
Click to compare the metadata of two or more selected images.

– Modification of the values of the “Make” and “Model” tags.
Make sure that the top bar data display is selected in “View Data” mode.


– Select the desired photo as the metadata source for “Make” and “Model”.
The right window displays a lot of metadata, not all of which is useful.
Then select “Common Tags” and choose “EXIF” in the drop-down list of the bar above the metadata window


– Then select the image files that are to be modified. It is possible to select multiple images.



– Then click on “Modify the data” to update the “Make” and “Model” tags
Make sure the checkbox on the right is selected
– Confirm with the “Save in the selected image (s)” button located at the bottom of the program.


The photo can be opened in Photolab.


Other functions of JExifToolGUI

JExifToolGUI can do more than just change the make and model. The official manual can be accessed here https://hvdwolf.github.io/jExifToolGUI/manual/index.html

ExifTool can be used in Terminal mode. Its usage is similar to Using ExifTool in Windows console mode.


Installation of ExifTool for MacOS

Download ExifTool from https://ExifTool.org/ExifTool-12.28.dmg and install the package.


Installation of jExifToolGUI


jExifToolGUI is a Java application. It works on Windows, Mac and Linux. On Windows, we recommend using the “official” ExifToolGUI GUI.

For MacOS, two jExifToolGUI installation programs are available, one integrating Java, the other requiring a Java runtime environment present on the Mac. We used the bundle version because it is easier to install and run.
Download the jExiftoolGUI bundle from
https://github.com/hvdwolf/jExifToolGUI/releases/download/1.8.1/jExifToolGUI-x86_64-macos-1.8.1-with_jre.dmg.zip


For further

ExifToolGUI – the “Workspace”

The workspace represents the subset of the tags that you want to see or manipulate. There are hundreds of tags and not all of them are of interest. The tags highlighted in green indicate that the tag is part of the “Workspace”


* To add a tag to the workspace right click and click “Add tag to workspace”

It is possible to completely define a default Workspace using the “Workspace Manager”.

*  Click the menu Program> Workspace Manager

You will see a screen similar to this


As seen above a metadata structure begins with a type identification, most commonly TIFF, exif and XMP, followed by a Tag like Make and Model, followed by a value like “SAMSUNG GX20 ”

In the Workspace Manager screenshot:

  • The left column, 1, shows the preferred name of the tag and its behavior
  • The second column indicates the name of the metadata structure, here exif, followed by the name of the tag
  • The third column indicates either a help on the value(s) of the tag or a default value. Below the help is displayed under the entry field when modifying the Orientation tag in the Workspace


In column 1, the name of the tag is arbitrary, chosen as a reminder, it may or may not be similar to the name of the tag in column two. It can be followed by four characters indicating its behavior. Source

# -if the tag name ends with this character (see Flash # and Orientation # above), then the contents of that tag will be displayed as usual. However, when editing this tag, you must enter a numeric value.

* – if the tag name ends with this character (see Artist * above), it means that the value defined in the index text will be used as the default value for this tag. In this case, if you right-click on the Metadata panel (in Workspace view mode), a context menu appears and there is the option to fill in defaults.

Attention all the defined default values ​​will be applied not only that of the selected field


? -if the tag name ends with this character (see Geotagged? above) it means that you are not interested in the value of the tag itself -what you want to see is if a particular tag is defined or not. Note: You will not be able to edit this tag in the Workspace view.

We see here that the value of Geotagged is at NO, this means that the image file does not contain any tag or any value for the -Gps:GPSLatitude tag


± -if the tag name ends with this character, then you will be allowed to enter multiple values for a single tag at a time (i.e. keywords and the like). Of course, you can’t use this feature for all the tags, so read the metadata documentation (Iptc and Xmp) to find out which tags support multiple values. Besides you can get the character ± with Alt + 0177 (by typing 0177 on the numeric keypad, while pressing the Alt key).

For example the -xmp-dc: Type tag accepts several values such as “Landscape + Mountain + Snow”

Multiple Workspaces

The settings for ExifToolGUI are saved in the ExifToolGUIv5.ini file located in the same folder as the program. By saving a Workspace under another name you can obtain several versions and load them at will. This allows you to manage configurations for different situations, places, subjects, events, device model etc … without having to redo a Workspace each time.


Read metadata in an image file

As mentioned previously, an image file is structured in a particular way.
How it works ?

* A header, which contains the description of the structure

* Several data substructures.

When an editor like PhotoLab reads a file it must be able to identify the type of image and extract information from it. For Photolab the image looks like this


Don’t be fooled, the principle is simple. It’s like an orienteering race. You need a map with instructions to read it, which is the defined standard, in this case for TIFF files. The image file is the path. We know how to read the map, we move forward, each step gives us information and how to go to the next step.

On the example above on the left you have the address, that is to say as a “GPS” position in the file, address which starts at the value 0000. Then the data in the second column, then in the third column this data, translated if possible, into something readable, finally the meaning of the data in fourth. In the second column a dot represents a null or unreadable value for humans. Starting at 0000, the value of the first two bytes (0 and 1) is 49 49 followed by 2a 00. This is an arbitrary value from the TIFF standard which signals to the application that this file is a TIFF. Note that DNG and many other formats like Sony’s ARW come and are identified as TIFF.

The fourth byte gives the address of the start of the metadata structure, i.e. bit 8. Counting from 0 to 8 from the left, we fall on the value 13 in Hexadecimal, (19 in decimal) and indicates the number of fields to consider, that is IFD0 has IFD0-18 visible vertically in column 4.

IFD for “image file directories” is the name of the basic structure of TIFF in which we will find the exif and XMP. IFD0-03 is the Make, it is indicated by the first two bytes 0-1 at the address 002e, which have the value 0f-01 (we must read from right to left or in fact 10F0) We find this value in the list of tag names here https://ExifTool.org/TagNames/EXIF.html. Bytes 2-3 = 02, indicates that the type of value of this tag is alphanumeric (string), byte 4-7 indicates the length is 5, like “SONY.”, Finally Bytes 8-11: If the number of bytes occupied is less than 4, the data is stored directly here. If there are more than 4, the pointer to the actual data is stored here. So here we have the address where the data must be read in the file is 0112, which can be found below 0110 + 2. After reading the 19 IFDs and at the end of the IFD0 block we see “Next IFD” with the address pointer e2 72 which indicates the “GPS” coordinates of the next step. And so on. This is exactly what PhotoLab does


On the left, a utility that allows you to trace what Photolab is doing. We see that it reads the image file s7r.dng at address (Offset in computer language) 6116 over a length of 2c00 (in decimal 11264 bytes). On the right a hexadecimal file editor. If we go to address 6116 we find the beginning of the XMP structure
“<? Xpacket begin…”. This syntax can be found in the Adobe XMP SPECIFICATION PART 1, section “7.3.2 XMP Packet wrapper.”


TuToDxO.com – All rights reserved – tous droits réservés.

Categories: 9 - Appendices

«             »