Warning: Bad Photoshop IRB resource

Started by Archive, May 12, 2010, 08:54:36 AM

Previous topic - Next topic

Archive

[Originally posted by eric80 on 2009-06-03 10:44:01-07]

I was speaking about jpg2000 in another topic. Before that, I have a pb with "normal jpg".
I am not able anymore to read IPTC tag with exiftool, I get a
Code:
Bad Photoshop IRB resource "\x1c\x02\x00\x00"
warning. Other software can still read the data.
Here a sample

I shall perhaps explain my workflow: I've generated TIF files from RAW conversion, then rework/save the tif with Xnview. As Xnview doesnot support exif writing in tif file (but iptc are kept!), I've used
Code:
exiftool -tagsfromfile %f.cr2 -ext tif
Besides, I am using geosetter to set the gps and iptc data on cr2 and tiff files, partially before raw conversion, partially after (i.e. on tif). At the end, I am using Xnview again to resize and save the tif to 900x600 jpg for my web gallery.

I don't know exactly where it goes wrong. My tif files are still correct (exiftool -iptc:all is ok). What should I go to fix the pb?

Archive

[Originally posted by exiftool on 2009-06-03 11:24:40-07]

Thanks for providing a sample.  The IPTC metadata in this image
was written incorrectly.  You should report this bug to whatever
wrote the IPTC.  The information is duplicated in XMP, so it is not
a big deal.  The best you can do is use exiftool to delete the invalid
Photoshop IRB resources (which contain the IPTC):

You say that other software can read the data, but perhaps they
are reading the XMP?  Photoshop CS4 gives an error when reading
this file, and can't read the IPTC information.

Code:
exiftool -photoshop:all= FILE

After you do this, then exiftool will allow you to write IPTC
tags to the file.

- Phil

Archive

[Originally posted by eric80 on 2009-06-03 11:51:12-07]

Xnview and php iptc function do read the iptc (nothing after the remove cmd) [probably limited to iptc core], but geosetter seems to use XMP.

Removing iptc is not very the pb, the question is actually: is there a "magic command" which would detect all problematic files, put them in a sub folder, and perhaps in a 2nd step, remove the iptc AND, most important, restore all IPTC data from XMP? I have indeed many such files...
exiftool cmd from geosetter partially does the job: when I edit the data and save, the IPTC are written back from XMP (by setting each iptc field I think).
So I  need to detect all defect files from one or many directories, and then I could continue in geosetter...

Archive

[Originally posted by exiftool on 2009-06-03 12:43:35-07]

This command will move all the bad files to another directory:

Code:
exiftool -if "$warning=~/Bad Photoshop/" -directory=DSTDIR SRCDIR

Use single quotes instead of double quotes if you are in Linux or on a Mac.

or to rebuild the IPTC from the XMP in all bad files:

Code:
exiftool -if "$warning=~/Bad Photoshop/" -photoshop:all= -codedcharacterset=utf8 -@ xmp2iptc.args DIR

Here you will need the xmp2iptc.args file that you can find in the full exiftool
distribution.  Also, I have set the IPTC encoding to UTF8 to best support
the special characters in your file.

You can add the -r option to either command to recurse into
subdirectories.

- Phil

- Phil

Archive

[Originally posted by eric80 on 2009-06-03 12:55:04-07]

Thanks! Very impressive! I cannot imagine how complex your tool is to be able to deal with everything that I am thinking about! 2600 files scanned and filtered in about 3 min, not bad!
In the meantime, I ve found that the source of my pb is xnview when writing tiff with iptc to jpg. I've reported the issue here: http://newsgroup.xnview.com/viewtopic.php?f=36&t=17795

Archive

[Originally posted by photonoxx on 2009-12-17 18:35:14-08]

It seems  I have same way corrupted images, but, the command line :

exiftool -if '$warning=~/Bad Photoshop/' -directory=DSTDIR SRCDIR

failed to find corrupted file.

If I look on metadata with a simple exiftool command, I don't see the warning Bad Photoshop IRB, but with :

Exiftool -v2 -S -G Corrupted-file.jpg

the warning appears like this :

  | Warning = Bad Photoshop IRB resource "Spee"

I put the result of one of my last try... I'm on Linux, so I've used single quote.

naruchan@naruchan-desktop:~$ exiftool -r -v5 -S -G -if '$warning=~/Bad Photoshop/' -directory=/media/NB_Nef_HD/Photos/C995/2004/06/bad/2/ '/media/NB_Nef_HD/Photos/C995/2004/06/bad/nb-photos-20040619-170213.jpg'

Writing File:Directory

-------- /media/NB_Nef_HD/Photos/C995/2004/06/bad/nb-photos-20040619-170213.jpg (failed condition)

    1 files failed condition

Do I make something wrong... ?

Thanks

Nicolas

Archive

[Originally posted by photonoxx on 2009-12-18 08:10:45-08]

If needed I add a sample image :

Corrupted file failing to match -if condition

My Exiftool version is 7.82 (repository of Ubuntu 9.10)

Archive

[Originally posted by exiftool on 2009-12-18 11:45:17-08]

Hi Nicolas,

Interesting.  Thanks for the sample.  The problem here is that
there is another problem with this image which results in
another warning.  You will see both warnings if you use the
-a option when extracting.  However, your -if
statement isn't test the warning you want.  There is no simple way
around this which would handle all possible combinations of
warnings, however for this file it would be sufficient to test the
first two warnings:

Code:
exiftool -r -v5 -S -G -if '$warning=~/Bad Photoshop/ or $copy1:warning=~/Bad Photoshop/' ...

And it's a good thing you mentioned your ExifTool version number
because the copy1: feature was implemented in versino 7.83, so
you'll have to update your version if you want to use this.

- Phil

Archive

[Originally posted by photonoxx on 2009-12-18 14:10:24-08]

Thanks Phil,

It seems to work !

Initially, I look for this solution, because some files I have cause a CPU overcharge when CaptureNX (on windows Sad ) loads their metadata.

And on a sample file, for which I determined it caused this matter, deleting Photoshop:all seems to resolved it.

I applied the command line and I have more files moved than files which cause CPU overcharge (because I have begun to manually look for them on some subdirectory), so I think, may be some warnings about Photoshop IRB doesn't have the same importance, but I'm on the good way I guess.

Thanks again.

Nicolas