0

In this context, "original files" are exportet from Adobe Photoshop Lightroom and may be .tif or .jpg

Here is my current portion of code to transfert properties

Image inputImage = Image.FromFile(currentFile.FullName);
...
[SomeTreatements including resize+watermarking]
...
foreach (System.Drawing.Imaging.PropertyItem p in inputImage.PropertyItems)
       outputImage .SetPropertyItem(p);
outputImage.Save(...);

After this, inputImage and outputImage have the same number of PropertyItem. They have 21.

But the file metadata only keeps "Authors", "Program name", "Copyright", "Camera maker", "Camera model".

Other fields I'm interested in that get lost are: "DateTaken", "F-stop", "Exposure time", "ISO speed", "Focal length", "Max aperture", "Metering mode", "No flash","White balance", "Photometric interpretation".

(Other fields I may be interested to keep but are not always filled in my original files, so I cannot tell if they are lost for now: "35mm focal length", "Subject distance", "Flash energy")

Original file mentions: "EXIF version: 0230", output file has no EXIF version.

Thank you for your help.

TTT
  • 1,848
  • 2
  • 30
  • 60
  • 1
    What JPEG file format are the output files in? – user3344003 Feb 07 '15 at 18:12
  • I am not sure I can reply to this question. File extension is .jpg but I guess it's not that. The save code is using image save and ImageCodecInfo that matches System.Drawing.Imaging.ImageFormat.Jpeg. – TTT Feb 07 '15 at 22:34
  • 1
    At the top of the binary data there is usually a code like JFIF or EXIF. – user3344003 Feb 07 '15 at 22:38
  • Opening the file with Notepad++, I see JFIF somewhere. May an explaination ... – TTT Feb 07 '15 at 22:41
  • Now, if you can tell me how I could save EXIF instead of JFIF I would be interested because a first Internet search doesn't give me much clue. – TTT Feb 07 '15 at 22:45
  • That is entirely up to the encoder. The JPEG standard does not give much concern to implementation. It did not even define a file format. JFIF stepped in to fill the void. Since then other file formats have appeared. EXIF being the most common. – user3344003 Feb 08 '15 at 15:24

0 Answers0