Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.89k stars 323 forks source link

Exif comment not saved to compressed TIFF files #2017

Closed Beep6581 closed 6 years ago

Beep6581 commented 9 years ago

-- UPDATE 2017-12-28 In summary, it seems that currently RT treats compressed TIFF files as if tunnel metadata was always enabled. - Morgan

Originally reported on Google Code with ID 2033

If I add an Exif comment field in the Metadata tab and then
process the RAW image into a jpeg, the comment gets passed
on to the jpeg.  I can then use it in the generation of web
galleries etc.

But if I save to 16 bit tiff (which is my usual procedure
for many reasons), the comment is dropped.  It doesn't
matter if the Metadata checkbox in Preferences|Image
Processing is on or not.  It also doesn't make a difference
if I do this from the GUI or from command line.

RawTherapee 4.0.11, Linux x86_64

Reported by nobrowser on 2013-11-07 07:41:14

heckflosse commented 6 years ago

The project manager says "just put the title somewhere and let's get on with ...".

Which project manager? ;-)

Hombre57 commented 6 years ago

No comment/objections since 6 days, I'll commit in few minutes.

Hombre57 commented 6 years ago

Pushed in commit 3fe9cae2c376bd89aac7286144fdcc776fe43e69

Closing.

Floessie commented 6 years ago

@Hombre57 Your commit introduced new warnings to the Clang build:

/home/user/src/rawtherapee/rtexif/stdattribs.cc:469:57: warning: comparison of constant 239 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
            if (count % 2 || (count >= 11 && (buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF))) {
                                              ~~~~~~~~~ ^  ~~~~
/home/user/src/rawtherapee/rtexif/stdattribs.cc:469:78: warning: comparison of constant 187 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
            if (count % 2 || (count >= 11 && (buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF))) {
                                                                   ~~~~~~~~~ ^  ~~~~
/home/user/src/rawtherapee/rtexif/stdattribs.cc:469:99: warning: comparison of constant 191 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
            if (count % 2 || (count >= 11 && (buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF))) {
                                                                                        ~~~~~~~~~ ^  ~~~~
/home/user/src/rawtherapee/rtexif/stdattribs.cc:475:31: warning: comparison of constant 255 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
                if (buffer[0] == 0xFF && buffer[1] == 0xFE) {
                    ~~~~~~~~~ ^  ~~~~
/home/user/src/rawtherapee/rtexif/stdattribs.cc:475:52: warning: comparison of constant 254 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
                if (buffer[0] == 0xFF && buffer[1] == 0xFE) {
                                         ~~~~~~~~~ ^  ~~~~
/home/user/src/rawtherapee/rtexif/stdattribs.cc:478:38: warning: comparison of constant 254 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
                } else if (buffer[0] == 0xFE && buffer[1] == 0xFF) {
                           ~~~~~~~~~ ^  ~~~~
/home/user/src/rawtherapee/rtexif/stdattribs.cc:478:59: warning: comparison of constant 255 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
                } else if (buffer[0] == 0xFE && buffer[1] == 0xFF) {
                                                ~~~~~~~~~ ^  ~~~~

Best, Flössie

Hombre57 commented 6 years ago

@Floessie Could you try branch rtexif-clang-warnings ? I don't have any warning before and after this patch, so can't say if it fix the problem.

Floessie commented 6 years ago

@Hombre57 Perfect. 👍 for merge.

Hombre57 commented 6 years ago

@Floessie Merge to dev done.