-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copyright Flag field #2054
Comments
@vishkin Thanks for bringing up this topic. Exiv2 supports Exif, IPTC, Xmp and embedded ICC profiles. The metadata you are discussing is private to PhotoShop. To my knowledge there is no code in Exiv2 to read/write/delete PhotoShop metadata. In general, Exiv2 tries to do no harm, so the data should be preserved when Exiv2 updates a file. I don't have a copy of PhotoShop. If you have PhotoShop, perhaps you can run some tests to see if any damage is being done. I discuss the PhotoShop PSD file format in my book https://www.exiv2.org/book/index.html#PSD. The tvisitor.cpp code that accompanies my book dumps PhotoShop files. I don't have a PSD file that uses record 0x040A, although I believe the tvisitor program will reveal the data when present.
|
I'm talking about metadata that Photoshop stores in jpg, not psd files. |
The repro image is attached.
The original jpeg has
Of course, copying metadata from one image to another also loses the tag. |
Thank you for providing a test image. That's very helpful. You have extracted the EXV and XMP files from the the JPEG. They do not contain the PhotoShop/8BIM Copyright record for two reasons:
I have reproduced your exiftool output:
I have investigated the storage of Copyright in your file as follows:
The 0x040a Record is a field of the 0x03ed record (of 16 bytes) which tvisitor correct find (and does not decode).
I would like to close this issue as "out of scope" for two reasons:
You may wish to open an enhancement request "Provide support for PhotoShop/8BIM metadata". Based on the work-load on the team at present, your request is unlikely to be prioritised for implementation. I've been working with Exiv2 for 14 years and this might be the first time that PhotoShop/8BIM has been discussed. However a team member is currently investigating a request to support PNG/textual information #147 and your request might dovetail with that effort. Please understand however that PhotoShop/8BIM metadata cannot be stored in |
There's a bug in tvisitor.cpp and it skips the 0x040a (Copyright) record. I'll fix that (it's not part of the Exiv2 product).
This should be reported as:
However, that doesn't change the substance of this issue which is the question you asked: Does exiv2 have support for this field? and the answer is no. Exiv2 does not support PhotoShop/8BIM metadata. |
Fix submitted to book/tvisitor.cpp (and consequential test changes).
|
I understand. Thanks a lot. We will try to find some means to preserve PhotoShop/8BIM separately to exv. |
The PhotoShop/8BIM data is stored in the APP13 segment in the JPEG. exiv2 reveals it with the
You can extract it to file with the
You could use I don't know what you're seeking to achieve here. The exiv2 command-line option Team Exiv2 has an expert on the options for the exiv2 command-line program. Perhaps you could explain your use case before we involve somebody else with this issue. I'm confident that a bash script can be easily created to provide this feature without modifying the C++ code in exiv2. |
I'm a little surprised not to have heard from you. Let me explain in detail how to use 1. Extract the 8BIM segment from the original file 745 rmills@rmillsm1:~ $ mkdir -p ~/foo
746 rmills@rmillsm1:~ $ cd ~/foo
747 rmills@rmillsm1:~/foo $ cp ~/Desktop/148954173-cec1a94b-fda4-4ef6-9e4d-b5c7ef98bd2f.jpg orig.jpg
748 rmills@rmillsm1:~/foo $ exiv2 -pS orig.jpg
STRUCTURE OF JPEG FILE: orig.jpg
address | marker | length | data
0 | 0xffd8 SOI
2 | 0xffe1 APP1 | 13163 | Exif..II*...............>......
13167 | 0xffed APP13 | 13052 | Photoshop 3.0.8BIM..............
26221 | 0xffe2 APP2 | 3160 | ICC_PROFILE......HLino....mntrRG chunk 1/1
29383 | 0xffe1 APP1 | 780 | http://ns.adobe.com/xap/1.0/.<?x
30165 | 0xffdb DQT | 132
30299 | 0xffdd DRI | 4
30305 | 0xffee APP14 | 14 | Adobe.d.....
30321 | 0xffc0 SOF0 | 17
30340 | 0xffc4 DHT | 202
30544 | 0xffda SOS
749 rmills@rmillsm1:~/foo $ dd bs=1 count=$((13052+4)) skip=$((13167-1)) if=orig.jpg of=app13 2>/dev/null 2. Create the 750 rmills@rmillsm1:~/foo $ exiv2 -ee orig.jpg
751 rmills@rmillsm1:~/foo $ exiv2 -pS orig.exv
STRUCTURE OF JPEG FILE: orig.exv
address | marker | length | data
0 | 0xff01
7 | 0xffe1 APP1 | 13164 | Exif..II*...............>......
13173 | 0xffd9 EOI
752 rmills@rmillsm1:~/foo $ dd bs=1 count=13173 if=orig.exv of=start 2>/dev/null
753 rmills@rmillsm1:~/foo $ dd bs=1 skip=13173 count=2 if=orig.exv of=eoi 2>/dev/null 3. Manufacture a new 754 rmills@rmillsm1:~/foo $ cat start app13 eoi > new.exv
755 rmills@rmillsm1:~/foo $ exiv2 -pS new.exv
STRUCTURE OF JPEG FILE: new.exv
address | marker | length | data
0 | 0xff01
7 | 0xffe1 APP1 | 13164 | Exif..II*...............>......
13174 | 0xffed APP13 | 13052 | Photoshop 3.0.8BIM..............
26229 | 0xffd9 EOI
756 rmills@rmillsm1:~/foo $ exiftool -s -CopyrightFlag new.exv
CopyrightFlag : True
757 rmills@rmillsm1:~/foo $ ls -l
total 2048
-rw-r--r-- 1 rmills staff 13056 13 Jan 04:18 app13
-rw-r--r-- 1 rmills staff 2 13 Jan 04:19 eoi
-rw-r--r-- 1 rmills staff 26231 13 Jan 04:20 new.exv
-rw-r--r-- 1 rmills staff 13175 13 Jan 04:19 orig.exv
-rw-r--r--@ 1 rmills staff 965235 13 Jan 04:18 orig.jpg
-rw-r--r-- 1 rmills staff 13173 13 Jan 04:19 start
758 rmills@rmillsm1:~/foo $ Good, eh?
Write a script to extract/modify a Is that what you want? |
We want to be able to read / preserve the field "Copyright Flag" that Photoshop adds to metadata.
It's different from Exif.Image.Copyright, and documented here
It appears that having this field preserved when copying / modifying metadata is important for professional photographers.
Does exiv2 have support for this field?
If not, is it possible to add this field to supported by Exiv2?
If not possible to have it to supported filed, at least can it be kept when exporting metadata? Currently it just removed. I can provide such jpeg file if needed.
The text was updated successfully, but these errors were encountered: