Siduction Forum

Siduction Forum => Software - Support => Topic started by: devil on 2014/08/19, 15:16:12

Title: JPEGs without meta information
Post by: devil 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
Title: Re: JPEGs without meta information
Post by: der_bud 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.
Title: Re: JPEGs without meta information
Post by: devil on 2014/08/19, 19:47:12
Thanks for the suggestion.
Unfortunately jhead -mkexif foo.jpg only gives Skipping readonly file foo.jpg
Any ideas on that? I don't have much of a clue on photo tools.


greetz
devil
Title: Re: JPEGs without meta information
Post by: bluelupo on 2014/08/19, 20:43:08
@devil: maybe that helps here.


$ exiftool -all= foo.jpg


and then


$ jhead -mkexif foo.jpg


Title: Re: JPEGs without meta information
Post by: devil on 2014/08/19, 20:47:41
After fixing some rights on those pics, file says: file IMG_20140805_135018.JPEG
IMG_20140805_135018.JPEG: data

Pictures that are not corrupt display as: JPEG image data, EXIF standard
Any ideas if those pics are retrievable at all?

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


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

greetz
devil
Title: Re: JPEGs without meta information
Post by: bluelupo on 2014/08/19, 21:04:00
helps this?

$ jhead -purejpg foo.jpg && jhead -mkexif foo.bar


more infomation: http://www.sentex.net/~mwandel/jhead/usage.html
Title: Re: JPEGs without meta information
Post by: devil on 2014/08/19, 21:42:03
Unfortunately the same as before: Not JPEG: foo.jpg
I have read through your link before without finding anything that works. :(


greetz
devil
Title: Re: JPEGs without meta information
Post by: rueX 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 ?
Title: Re: JPEGs without meta information
Post by: sunrat 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.
Title: Re: JPEGs without meta information
Post by: piper 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)

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
Title: Re: JPEGs without meta information
Post by: jure 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 (http://forum.airdroid.com/categories/bugs/p4)

the hint  http://forum.airdroid.com/discussion/13206/downloaded-zip-files-won039t-open-galaxy-4-mac (http://forum.airdroid.com/discussion/13206/downloaded-zip-files-won039t-open-galaxy-4-mac)
Quote from: airdroid forumAs 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 ...
Title: Re: JPEGs without meta information
Post by: dibl on 2014/08/20, 18:04:10
Quote from: piper on 2014/08/20, 12:39:54
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.
Title: Re: JPEGs without meta information
Post by: devil 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:
convert.im6: Not a JPEG file: starts with 0x00 0x00 `IMG_20140805_135018.JPEG' @ error/jpeg.c/JPEGErrorHandler/316.. Any more ideas?


greetz
devil
Title: Re: JPEGs without meta information
Post by: dibl 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 (http://en.wikipedia.org/wiki/JPEG_File_Interchange_Format). 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.
Title: Re: JPEGs without meta information
Post by: der_bud 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).
Title: Re: JPEGs without meta information
Post by: devil on 2014/08/21, 00:00:05
der bud: the zip file got deleted after I unpacked it. :(
diebl: okteta is a very good idea, will try that lateron tonight in a quiet hour


greetz
devil
Title: Re: JPEGs without meta information
Post by: michaa7 on 2014/08/21, 01:12:49
If okteta does not work, why not trying photorec (testdisk). As far as I know photorec doesen't care about lost metadata but tries to recover raw data. If it then wouldn't add some general meta-data to foo.jpg it were of no use.
Title: Re: JPEGs without meta information
Post by: sunrat on 2014/08/21, 03:22:03
I just tried Droid Over Wifi and it successfully downloaded 1.7GB of camera files that failed with Airdroid. Thanks for the tip, towo!
Title: Re: JPEGs without meta information
Post by: jure on 2014/08/21, 11:35:31
Code (der_bud) Select
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).
good idea, with wn XP in virtualbox it works to open the photos in the zip files, witch I could not open in linux, it also works to open the extracted photos.
Title: Re: JPEGs without meta information
Post by: devil on 2014/08/21, 23:30:50
Yes, good idea, I will try that with my neighbours Windows install and report back. The zipfile is gone, all I have is the jpegs.


greetz
devil
Title: Re: JPEGs without meta information
Post by: dieres on 2014/08/22, 12:10:19
I would try irfanview in windows to read the jpg and than save it in a new File.
Title: Re: JPEGs without meta information
Post by: spacepenguin on 2014/08/23, 19:51:56
Maybe you can upload one of those jpgs for us all to do some tests? If it is not too private?

BTW: Because I also had such issues I now use "ES Datei Explorer" on my Android device to turn it into an FTP server so I can download the images via Dolphin.