Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] JPEGs without meta information  (Read 8114 times)

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.842
[EN] JPEGs without meta information
« on: 2014/08/19, 15:16:12 »
I was on a bicycle trip and the battery of my SLR busted and wsas unusable. As there was no new battery available along my journey, I used the smartphone camera. After I was back I downloaded the pictures from the phone to the PC with the help of airdroid. At the same time I deleted the pics on the phone. Unpacking the zipfile with the pics I had to learn that not one of them would display, as they had lost their meta-information.


Does anyone know a tool that could open those pics and let me add new meta-information or that restores the info? I looked at exiftool (package name: libimage-exiftool-perl), which is very powerful but does not do what i need.


greetz
devil

Offline der_bud

  • User
  • Posts: 1.072
  • member
Re: JPEGs without meta information
« Reply #1 on: 2014/08/19, 16:06:31 »
I remember that some time ago I repaired corrupted exif information (after an undelete from SD-card) with a tool called jhead.
http://www.sentex.net/~mwandel/jhead/  -> "...Create new minimal exif header containing date and thumbnail"
It is available via apt-get.
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.842
Re: JPEGs without meta information
« Reply #2 on: 2014/08/19, 19:47:12 »
Thanks for the suggestion.
Unfortunately
Code: [Select]
jhead -mkexif foo.jpg only gives
Code: [Select]
Skipping readonly file foo.jpgAny ideas on that? I don't have much of a clue on photo tools.


greetz
devil

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: JPEGs without meta information
« Reply #3 on: 2014/08/19, 20:43:08 »
@devil: maybe that helps here.

Code: [Select]
$ exiftool -all= foo.jpg

and then

Code: [Select]
$ jhead -mkexif foo.jpg


Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.842
Re: JPEGs without meta information
« Reply #4 on: 2014/08/19, 20:47:41 »
After fixing some rights on those pics, file says:
Code: [Select]
file IMG_20140805_135018.JPEG
IMG_20140805_135018.JPEG: data
Pictures that are not corrupt display as:
Code: [Select]
JPEG image data, EXIF standardAny ideas if those pics are retrievable at all?

Edit: exiftool, as suggested by bluelupo says:
Code: [Select]
Error: Not a valid JPEG - foo.JPEG

Edit 2: gwenview says, the pics have no EXIF, IPTC or XMP infos at all

greetz
devil
« Last Edit: 2014/08/19, 20:57:40 by devil »

Offline bluelupo

  • User
  • Posts: 2.068
    • BluelupoMe
Re: JPEGs without meta information
« Reply #5 on: 2014/08/19, 21:04:00 »
helps this?
Code: [Select]
$ jhead -purejpg foo.jpg && jhead -mkexif foo.bar

more infomation: http://www.sentex.net/~mwandel/jhead/usage.html

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.842
Re: JPEGs without meta information
« Reply #6 on: 2014/08/19, 21:42:03 »
Unfortunately the same as before:
Code: [Select]
Not JPEG: foo.jpg
I have read through your link before without finding anything that works. :(


greetz
devil

Offline rueX

  • User
  • Posts: 135
Re: JPEGs without meta information
« Reply #7 on: 2014/08/19, 23:00:26 »
da gab es doch mal papaya cms ...

http://www.papaya-cms.com/doc/papaya-cms/de/basissystem/5.1.5/ch06s04s07.html

und dort rückwärts blättern ...war früher immer open source . . . ist doch gnu ?

Offline sunrat

  • User
  • Posts: 406
Re: JPEGs without meta information
« Reply #8 on: 2014/08/20, 05:43:04 »
I had one instance of incomplete data transfer using Airdroid. I'm not sure what caused it and it usually works correctly.

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: JPEGs without meta information
« Reply #9 on: 2014/08/20, 12:39:54 »
devil, sorry to hear that, I had that happen also, not just with pictures, but important crap (yes, backed up to cloud also,  but still)  one of the main reasons I dropped airdroid,  zipfiles are hit & miss and way too many times are corrupted. I switched to droidoverwifi some time ago and never looked back.

I did get lucky with some of my pictures (of course not the ones I really wanted to keep) by converting them to .png  (imagemagick)

Code: [Select]
convert snapshot.jpg  snapshot.png
Not saying this will work or save the day, but worth a try

https://people.debian.org/~naoliv/misc/imagemagick/link/www/convert.html
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline jure

  • User
  • Posts: 635
Re: JPEGs without meta information
« Reply #10 on: 2014/08/20, 13:33:41 »
the problem with the zip files is not unknown in airdroid, the same here i can`t open the downloaded photos in the extracted zip file
http://forum.airdroid.com/categories/bugs/p4

the hint  http://forum.airdroid.com/discussion/13206/downloaded-zip-files-won039t-open-galaxy-4-mac
Quote from: airdroid forum
As to the zip issue, please go to Settings in AirDroid app > Encoding for zip file > change it from UTF-8 to GBK or from GBK to UTF-8.
did not work for me ...
Gruss Juergen

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.358
    • Land of the Buckeye
Re: JPEGs without meta information
« Reply #11 on: 2014/08/20, 18:04:10 »
I switched to droidoverwifi some time ago and never looked back.



Wow, what a great tip -- thanks Piper!  This app looks really nice, sorry about Devil's tragedy but this is a good outcome for those who need such a tool.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.842
Re: JPEGs without meta information
« Reply #12 on: 2014/08/20, 18:43:27 »
Well, about to give up. Convert to png  from the great imagemagick did not do the trick either:
Code: [Select]
convert.im6: Not a JPEG file: starts with 0x00 0x00 `IMG_20140805_135018.JPEG' @ error/jpeg.c/JPEGErrorHandler/316.. Any more ideas?


greetz
devil

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.358
    • Land of the Buckeye
Re: JPEGs without meta information
« Reply #13 on: 2014/08/20, 19:16:48 »
Way out of my experience, but have you taken a look at one of those files with okteta?  If you can use okteta to examine a known valid .jpg file, maybe with the help of google you could figure out where the "validity" in the file is set, and change the broken file(s) accordingly.  It's a reach, but that's something I would try before throwing in the towel.


EDIT:  A quick look at some of my image files, created with a camera and another modified and saved with gimp, and with okteta I see I have both EXIF and JFIF formats.  See here. If you could copy valid EXIF headers from a known good file and overwrite the bad headers on a bad file, possibly you could end up with a "valid-looking" .jpg file with wrong EXIF on it.
« Last Edit: 2014/08/20, 19:28:08 by dibl »
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline der_bud

  • User
  • Posts: 1.072
  • member
Re: JPEGs without meta information
« Reply #14 on: 2014/08/20, 20:21:02 »
One last resort, if the zip-file you got from android is somehow not compatible,  you could try to open that zip on a complete different system (someones Mac or Windows).
Du lachst? Wieso lachst du? Das ist doch oft so, Leute lachen erst und dann sind sie tot.