How to fix "The picture contains wrong EXIF data."?

105 views
Skip to first unread message

Chris Green

unread,
Oct 15, 2012, 9:08:53 AM10/15/12
to jbr...@googlegroups.com
A lot of my pictures are flagged by jBrout as "The picture contains wrong EXIF
data." with the red borders. How can one fix this problem? I can't see
anything particularly odd about the EXIF data when I take a look at it.

The only thing I can see common to all the pictures with red bars is
that the Exif:Manufacturer field is set to jBrout. All the pictures
that don't have red bars have the Exif:Manufacturer field set to
something vaguely sensible.

--
Chris Green

Rob Wallace

unread,
Oct 15, 2012, 3:24:14 PM10/15/12
to jbr...@googlegroups.com
Hi Chris

The way to fix the red bars would be to set a "Valid date" on the image and then to change the Exif:Manufacturer field to something other than "jBrout" (I think even having the field but leaving it empty would do) and finally refresh the folder containing the image.  

I could create a plugin that would allow you to do the last two steps but that would be over the weekend at the earliest before I could get that done.  

Regards
Rob


--
Chris Green

--
You received this message because you are subscribed to the Google Groups "jBrout" group.
To post to this group, send email to jbr...@googlegroups.com.
To unsubscribe from this group, send email to jbrout+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jbrout?hl=en.


Chris Green

unread,
Oct 15, 2012, 3:30:39 PM10/15/12
to jbr...@googlegroups.com
On Tue, Oct 16, 2012 at 08:24:14AM +1300, Rob Wallace wrote:
> Hi Chris
> The way to fix the red bars would be to set a "Valid date" on the image
> and then to change the Exif:Manufacturer field to something other than
> "jBrout" (I think even having the field but leaving it empty would do)

The trouble is (well, was actually, see below) that I had useful data in
the Exif:Manufacturer field which I need to retrieve.


> and finally refresh the folder containing the image.
> I could create a plugin that would allow you to do the last two steps but
> that would be over the weekend at the earliest before I could get that

See my "I am cross with jBrout" message.

However I have now sorted things out, I modified tools.py by commenting
out the line that sets Exif:Manufacturer to "jBrout", restored all my
20000 images to their original state and ran 'Refresh' in jBrout to
reread the Exif headers. It took a while with that many images but I
now have what I want, no lost Exif:Manufacturer data and no images with
red borders! :-)

--
Chris Green

mana...@gmail.com

unread,
Oct 15, 2012, 4:57:38 PM10/15/12
to jbr...@googlegroups.com

It's a historical point :-)
At the origin, jBrout was made to manage only pictures which came from a real cam. It was not designed to manage others kind of pictures (scans, from internet, ....)
My first cam didn't store exif .... my second did ... so I could clearly see where they came from :-)

Matěj Cepl

unread,
Oct 15, 2012, 4:59:21 PM10/15/12
to jbr...@googlegroups.com
On Mon, 2012-10-15 at 20:30 +0100, Chris Green wrote:
> However I have now sorted things out, I modified tools.py by commenting
> out the line that sets Exif:Manufacturer to "jBrout", restored all my
> 20000 images to their original state and ran 'Refresh' in jBrout to
> reread the Exif headers. It took a while with that many images but I
> now have what I want, no lost Exif:Manufacturer data and no images with
> red borders! :-)

Could we get the patch which made jbrout working for you, somewhere?
Just to be sure, we are not missing anything.

Thank you,

Matěj
signature.asc

Chris Green

unread,
Oct 16, 2012, 4:51:43 AM10/16/12
to jbr...@googlegroups.com
On Mon, Oct 15, 2012 at 10:57:38PM +0200, mana...@gmail.com wrote:
> It's a historical point :-)

No it's not. It's hardly unusual to have images from, for example, a
scanner where there may be no EXIF data at all. Lots of people are
digitising old archives and this issue will bite them as it did me.

If someone does as I did, scans loads of negatives and slides, carefully
adding EXIF information like the Camera Make and so on (but not an Exif
Original date) and then gets all their Camera Make information erased by
jBrout they're not going to be very happy.

--
Chris Green

Chris Green

unread,
Oct 16, 2012, 5:20:32 AM10/16/12
to jbr...@googlegroups.com
I have appended the diff to this message. All I did was to comment out
the line that sets the Exif.Image.Make field to "jBrout" as that's what
jBrout subsequently uses to flag the image as not 'real' (and gives it
red margins).

I have not commented out the writing of the Exif.Image.DateTime,
Exif.Photo.DateTimeOriginal, or Exif.Photo.DateTimeDigitized fields
though this might be a good idea. Unless *something* is written to the
Exif.Photo.DateTimeOriginal field jBrout will do the same again though.


*** tools.py 2012-10-15 17:20:38.892550799 +0100
--- /tmp/tools.py 2012-10-16 10:11:33.221163456 +0100
***************
*** 193,213 ****
isDateExifOk=True
except AttributeError: # content of tag exif DateTimeOriginal is not a datetime
isDateExifOk=False
else: # tag exif DateTimeOriginal not present
isDateExifOk=False

if not isDateExifOk:
self.debug( "*WARNING* File %s had wrong exif date -> corrected" % file )

fd=datetime.fromtimestamp(os.stat(file).st_mtime)
! # self.__info["Exif.Image.Make"]="jBrout" # mark exif made by jbrout
self.__info["Exif.Image.DateTime"]=fd
self.__info["Exif.Photo.DateTimeOriginal"]=fd
self.__info["Exif.Photo.DateTimeDigitized"]=fd
self.__info.writeMetadata()

#exifdate = self.__info["Exif.Image.DateTime"]
exifdate = self.__info["Exif.Photo.DateTimeOriginal"]

#-----------------------------------------------------------
# try to autorot, if wanted
--- 193,213 ----
isDateExifOk=True
except AttributeError: # content of tag exif DateTimeOriginal is not a datetime
isDateExifOk=False
else: # tag exif DateTimeOriginal not present
isDateExifOk=False

if not isDateExifOk:
self.debug( "*WARNING* File %s had wrong exif date -> corrected" % file )

fd=datetime.fromtimestamp(os.stat(file).st_mtime)
! self.__info["Exif.Image.Make"]="jBrout" # mark exif made by jbrout
self.__info["Exif.Image.DateTime"]=fd
self.__info["Exif.Photo.DateTimeOriginal"]=fd
self.__info["Exif.Photo.DateTimeDigitized"]=fd
self.__info.writeMetadata()

#exifdate = self.__info["Exif.Image.DateTime"]
exifdate = self.__info["Exif.Photo.DateTimeOriginal"]

#-----------------------------------------------------------
# try to autorot, if wanted



--
Chris Green

mana...@gmail.com

unread,
Oct 17, 2012, 4:59:45 AM10/17/12
to jbr...@googlegroups.com
WARNING ...

writing "jBrout" in "Exif.Image.Make" ... was a way to distinguish pictures that haven't EXIF information before !
If we remove this ... there will be no way to detect this kind of pictures in jBrout

OK, it was perhaps not the better way to do that (perhaps we should use another field) ... but I really think It's important to be able to distinguish "real good ones" from "bad one that were corrected at import"






--
Chris Green

Chris Green

unread,
Oct 17, 2012, 5:37:29 AM10/17/12
to jbr...@googlegroups.com
On Wed, Oct 17, 2012 at 10:59:45AM +0200, mana...@gmail.com wrote:
> WARNING ...
>
> writing "jBrout" in "Exif.Image.Make" ... was a way to distinguish
> pictures that haven't EXIF information before !
> If we remove this ... there will be no way to detect this kind of pictures
> in jBrout
>
Why would you want/need to detect them? There's a warning message when
such pictures are read into jBrout but I really can't see a reason for
flagging them so noticeably once they're in.

Maybe a question (like the ones about automatically renaming and
rotating images) would be appropriate. So the default would be to flag
such images but users (like me) who have very many such images which
are actually perfectly good images, just not from a digital camera, can
decide to accept them without flagging them.


> OK, it was perhaps not the better way to do that (perhaps we should use
> another field) ... but I really think It's important to be able to
> distinguish "real good ones" from "bad one that were corrected at import"
>
What's "bad" about them? In my case they had perfectly valid EXIF
information, it's just that there wasn't an Exif.Photo.DateTimeDigitized
field.

--
Chris Green

Chris Green

unread,
Oct 17, 2012, 5:51:43 AM10/17/12
to jbr...@googlegroups.com
On Wed, Oct 17, 2012 at 10:37:29AM +0100, Chris Green wrote:
[snip]

> > OK, it was perhaps not the better way to do that (perhaps we should use
> > another field) ... but I really think It's important to be able to
> > distinguish "real good ones" from "bad one that were corrected at import"
> >
> What's "bad" about them? In my case they had perfectly valid EXIF
> information, it's just that there wasn't an Exif.Photo.DateTimeDigitized
> field.
>
Oops, my mistake, it's the Exif.Photo.DateTimeOriginal field that jBrout
uses to decide if an image is good/bad.

--
Chris Green
Reply all
Reply to author
Forward
0 new messages