Maker notes flabbergastation

Started by Eustace Martin, October 05, 2013, 10:40:21 AM

Previous topic - Next topic

Eustace Martin

Hello Phil, you seem like a very intelligent fellow, nice to meet you I'm eustace.
I have a canon 40d, and from the pictures i take from it, i edit them in photoshop....problem is:
when i do this it appears as if the maker notes are completely vanished.
I am new to the world of meta data, so i would like to start my entry into it by understanding if it is plausible to
edit my photograph and keep the EXACT original meta data. We have adobe bridge which allows me to make an xmp template of the
original meta data but this template is flawed as i cannot save the original maker notes or the exact meta data from the photograph.
If you know of a way I would be extremely grateful.
note: the reason i would like to keep the same maker notes or meta data and be able to edit the photograph is because i would like to view the photograph on my camera.

Phil Harvey

#1
Hi Eustace,

Nice to meet you too.

Adobe doesn't care about maker notes, and Photoshop will delete them when the photo is edited.

If you keep an original backup, you can use ExifTool to copy the maker notes back to the edited image:

exiftool -tagsfromfile original.jpg -makernotes edited.jpg

Or, to copy the entire EXIF as a block, including the maker notes:

exiftool -tagsfromfile original.jpg -exif edited.jpg

But note that the second command will overwrite any EXIF that Photoshop may have written.

- Phil

Edit: Fixed minor typo in command (.jpgj)
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Eustace Martin

Wow, Phil you're awesome....that is a huge reliever, there is nothing you cannot answer about exiftool haha. Now all i need to do is figure out how to use that command correctly in correspondance to my image , I'll let you know when i get through. You are an exif tool god!

Eustace Martin

#3
Well sir, thank you again I just got a chance to try the command given above, unfortunately i can't even type a single word into exiftool, i tried a little troubleshooting to no avail, any possible reasons.

step 1L run exiftool,
step 2: drag picture in, number comes up.
step 3; type....nothing i type is displayed, newbie issue i would think, .
note: im running a windows 8 comp, hehe

edit

Ah...so it seems i managed to get the program to run, and replace the tags, unfortunately i still cannot read the pictures on the camera....i am doing some troubleshooting as to why.... i expect it is because of the iptc as i get this block of it, as well as an xmp
log as well when i save from photoshop, which means that my canon 40d might not be able to read it...even after i've copied the exact original data to the image. i might have to erase all edited meta data, as im assuming that imgsrcfile command copies everything onto the image but does not erase anything already on it.

Eustace Martin -Vancouver, canada. just so you know where i'm from haha.

Phil Harvey

#4
This command line stuff is new to most people:

1) Install exiftool for command-line use

2) Run "cmd.exe" (with Windows 7 and earlier this was done via the Start/Run menu)

3) Type the command in the cmd.exe window

4) Instead of typing the file names, it may be easier for you to drag and drop the file onto the cmd.exe window when you get to that part of the command

- Phil

Edit:  I have updated the (still unfinished) ExifTool for Dummies page with these very basic instructions.  Let me know if you figure out how to run "cmd.exe" in Windows 8.  If you do, taking a look at the copying examples may give you an idea of the command syntax, but note that Windows requires double quotes around arguments, but the examples show the single-quoting used in Mac and Linux.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Eustace Martin

#5
Thanks for the quick reply I did get it to work, although I just can't seem to erase anything (if you read my edited reply), you
get this great thing that says file updated, after i use the -all= command, although when i go to check to see the metadata on the
file it seems as if, it all is still there....Looks like i got some more troubleshooting to do =]...

edit1:
okay so i managed to erase the meta data successfully, although still in the process of finishing my experiment, I am starting to get the hang of this program to some degree. I will let you know how everything goes and I cannot stress how grateful I am for
your assistance .

edit2: hmm i've been doing quite a bit of troubleshooting since this morning, only to find that with the process of which i do shown underneath
step 1: erase all metadata from edited image using -all= _.jpg
step 2: replace meta data with un edited imaged or original image using exiftool -tagsfromfile martin.jpg -exif Martin2.jpg
files succesfully replaced
although I notice that the size of the original and edited are different? so is everything actually replaced?
obviously not right? So how would i go about fixing this eg. orginal = 2mb, edited =4mb

when i try to access the file from my canon 40d it reads the uncanny message "cannot read image" or something like that
although i will note that i am able to see the actual thumbnail to some degree as opposed to before, so therefore i must be missing a step, my speculation is it has something to do with the size difference.

edit 3: Alright so Looking further into this whilst troubleshooting, i came along an extra piece of meta information that i still get even after copying all original information to the empty slate of meta for the edited image. So is this the possible reason why my file is a bit larger? maybe....uncertain still looking into it.


Phil Harvey

Use exiftool -a -G1 original.jpg to see all of the metadata contained in the original, and were it is located.

Then compare this with the output from the edited image to see what the metadata differences are.  Then use ExifTool to copy and/or delete whatever is necessary to make them the same.  Note that offset tags like ThumbnailOffset are not expected to the be same after editing.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Eustace Martin

#7
haha you came just in the nick of time(read my edit), I compared the two just as you made this post.... and from it i observed an extra piece of meta information called APP14 with 4 subcategories all uneditable using the gui made for this program ofcourse, i will have to use the original interface.

APP 14------
DCTEncodeVersion = 100
APP14flags0= [14]
APP14Flags1=(none)
ColorTransform = YcBcr

all other info identical

EDIT:
well i tried everything it seems, looks like its just not something that is feasible, thanks a lot Sir. You are a gentleman and a scholar, I will take some photographs of my final results when i get back. =/


Phil Harvey

#8
Hi Eustace,

You can use this command to delete the Adobe APP14 segment:

exiftool -adobe:all= edited.jpg

Note that -APP14:all= won't delete this, as mentioned in the application documentation:

            -TAG[+-]=[VALUE]

            [...]

            4) The "APP" group names ("APP0" through "APP15") are used to
            delete JPEG application segments which are not associated with
            another deletable group.  For example, specifying "-APP14:All="
            will NOT delete the APP14 "Adobe" segment because this is
            accomplished with "-Adobe:All".


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Eustace Martin

#9
I appreciate that Phil, I've actually tried that very same command which is why I am so quick to say it seems as if I am at the edge of the cliff here(in my edit last post), of course you are the maker of this so I doubt there is nothing you don't know about this.

In short i suppose What i need is something that will keep my or give me back my 100% precise original metadata information after saving it from Photoshop.
We've tried everything it seems
We deleted the metadata using "-all:" command
replaced the metadata using tagsfromfile .jpg + -exif .jpg
and finally removed the appdata using the final command -and adobe:all .jpg
All in all we seem to have done all the necessary
all the information looks identical, but how come we still can't read the file correctly on the canon 40d?


Perhaps If i send you the two photographs  you might be able to have a better look at them; although I can't seem to find your contact information. but wait if i send through email...will the file still be at its original hehe...very likely not?

edit 1: seems as if i still have a notable file size difference despite all the changes; the edited is 4mbs, whilst the original is 2mb+
edit 2 : did some research and found that photoshop uncompresses the original jpeg when it opens the file, thus once you save it you are saving the uncompressed jpeg, how to recompress it is my next step! still uncertain if this is my problem though; perhaps part of it.
edit 3: Yes so i believe strongly now that it is the uncompression and compresssion of the file that causes the camera to incorrectly read the information for the picture, hence as to why i can see the thumbnail on the picture with its reinstated metadata.....as opposed to the picture without its reinstated meta data, so how do i go about preventing photoshop from doing anything to my file...NO CLUE...but i have not given up. I believe it is still possible, I just would have to have the mind of a genious...which i i do..?

StarGeek

Quote from: Phil Harvey on October 06, 2013, 06:55:52 AM
Edit:  I have updated the (still unfinished) ExifTool for Dummies page with these very basic instructions.  Let me know if you figure out how to run "cmd.exe" in Windows 8.

One way to get the command line running in Windows 8 is to move the pointer to the one of the right side corners of the screen, which will bring up the right side bar, click on Search, and type CMD into the search box.  The command line icon should show up.  You can then click it and start the command line.  There may be other ways.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Thanks StarGeek.  I'll add this to the web page.

Eustace: Recompressing the image shouldn't be a problem, as long as Photoshop uses a sampling scheme that the camera can deal with.

What is the output of this command?:

exiftool -EncodingProcess -YCbCrSubSampling -JPEGDigest -JPEGDigest# original.jpg edited.jpg

My email is philharvey66 at gmail.com if you want to send me the samples.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Eustace Martin

#12
C:\Users\Winston>exiftool -EncodingProcess -YCbCrSubSampling -JPEGDigest -JPEGig
est# C:\Users\Winston\Pictures\A\DCIM\101CANON\IMG_0004.JPG C:\Users\Winston\Des
ktop\IMG_0004.JPG
======== C:/Users/Winston/Pictures/A/DCIM/101CANON/IMG_0004.JPG
Encoding Process                : Baseline DCT, Huffman coding
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
JPEG Digest                     : Canon EOS 1DmkIII/5DmkII/40D/1000D, Fine
======== C:/Users/Winston/Desktop/IMG_0004.JPG
Encoding Process                : Baseline DCT, Huffman coding
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
JPEG Digest                     : Adobe Lightroom, Quality 85% - 92%
    2 image files read



hehe I sure hope this is the problem, because i know you have the solution.
edit 1: It's probably obvious; the top one is the original image.
edit 2: Sent you the email phil. Thought I might add; for command prompt or anything else for that matter in windows 8 i want to look for, i usually point and tap to the left bottom corner, to bring me to the start screen, then i simply type in the letter C or the whole thing and i get command prompt, easiest method for me personally, although both seem to be near equivalents to one another @ stargeek.

Phil Harvey

Yup.  The YCbCrSubSampling is likely the problem.  If you could get Photoshop to save the image with the proper component sub-sampling then this should work.

- Phil

Edit:  I found this thread with the same problem for a Nikon camera.   Apparently I was a bit more on-the-ball back then too. (Oh well, a couple of years older and my memory isn't what it used to be!)
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Eustace Martin

ah interesting I will try this when i get back from work, You were able to take a look at the images i sent you? The Jpeg digest has nothing to do with the error as well?