-
Notifications
You must be signed in to change notification settings - Fork 286
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
Fix write ability flags of PSD files #1260
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why those flags are set to AmRead? psdimage.cpp does have a writeMetadata() function. Is it possible to add some tests to be sure this is working?
There is only one photoshop image in the test suite that's not related to a POC (security) or an old issue and that is used in preview-test.sh. It would be very desirable to actually test reading and writing Exif/XMP/IPTC/ICC metadata.
1449 rmills@rmillsmbp:~/gnu/github/exiv2/0.27-maintenance/test $ ls -l data/*.psd
-rw-r--r--+ 1 rmills staff 64164 11 May 16:08 data/exiv2-photoshop.psd
1450 rmills@rmillsmbp:~/gnu/github/exiv2/0.27-maintenance/test $ grep exiv2-photoshop *.sh
preview-test.sh: exiv2-photoshop.psd \
1451 rmills@rmillsmbp:~/gnu/github/exiv2/0.27-maintenance/test $
I have documented the PSD format in my book. https://clanmills.com/exiv2/book/#PSD
Indeed, I also wondered. In https://dev.exiv2.org/projects/exiv2/wiki/Supported_image_formats PSD is listed as r/w, too. |
Is it as simple as updating exifdata-test.sh with that file exiv2-photoshop.psd? |
I think this stuff works. It's documented W/R everywhere. As we don't have anything in the test suite, there are two possibilities: 1 Those settings are not respected by the code! <--- This is the case
I checked the log for src/psdimage.cpp
So PSD support was added in April 2008. I joined the project in August 2008. Patch 606 by Michael Ulbrich is mentioned in my book. It deals very thoroughly will several edge conditions concerning IPTC in JPEG files (and other horrors). I suspect the PSD support in Exiv2 is strong thanks to those patches. https://dev.exiv2.org/issues/606 I'm happy to approve this PR as it is benign (does no harm). However, I would like to see some tests added to the test suite. Can you open a new issue for that please and set Milestone: 0.27.4. I'm working hard on the book at the moment, and don't want to divert into this topic at the moment. BTW, I have an engineer in China working with my on #1215 and he has an open PR #1257. I'm hoping he will complete his PR next Sunday. Once that's done, I'd like him to test our Charset code #1258. I believe it works correctly, however I'd like a native speaker of a language which requires UNICODE (or JIS) to test it. Maybe, after that, I could ask him to work on the testing photoshop files in Exiv2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to approve this PR as it is benign (does no harm).
Updating the test suite. Simply update exiv2-test.sh? Well, "sort of". The Chinese engineer is converting Dan really wants us to totally discontinue the bash-tests and adopt his tests/systems_test.py framework for all future testing. I have agreed to that. So, we should really add new tests using Dan's model. However, I proposed #1215 as a quick and easy way to execute When the Chinese Engineer has finished working on #1257, we can use either approach. I suspect modifying the equivalent of "exiv2-test` in python is the quick and simple way to deal with this. Dan objected very strongly to #1215. Please understand that I like Dan's system_tests.py. It's very modular. However when you have a "family test" such as exiv2-test.sh or icctest-sh, it's quick and easy to add more files to an existing test. By "family test" i mean something like Exif or XMP or ICC. The same test is run on a collection of files. We could add functionality to system_tests.py to run the same test on a collection of files. That's effectively what I've asked the Chinese Engineer to do. |
No description provided.