from corrupted image to working full size image

Started by Needhelp, July 20, 2023, 03:50:36 PM

Previous topic - Next topic

Needhelp

Hello,

I had some broken images, and it was not possible to view the thumbnail previews.
So I searched and found the exiftool exiftool -a -b -W %d%f_%t%-c.%s -preview:all *, now can I see the thumbnails.

On full size, I have tried with various parameter, exiftool -a -b -W %d%f_%t%-c.%s -bigimage:all *, exiftool -exif:all= -tagsfromfile @ -exif:all -unsafe -F * etc., but it is not working.
How can I have full size of images?

Phil Harvey

The BigImage tag is defined in the example config file.  You need to use this config file for the tag to be defined.  Also, it doesn't include ThumbnailImage in its logic -- just larger images.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Needhelp

#2
Ok, nevermind about BigImage config file. I am newbie to all of this.

Unfortunately, it also does not work on having a full-size image: exiftool -a -b -W %d%f_%t%-c.%s -all *.

Example, I have DSC_0126.JPG (corrupted image) and DSC_0126_ThumbnailImage.jpg (working fine on thumbnail):

Corrupted image file:
ExifTool Version Number         : 12.64
File Name                       : DSC_0126.JPG
Directory                       : .
File Size                       : 3.9 MB
File Modification Date/Time     : 2016:12:14 08:34:40+01:00
File Access Date/Time           : 2023:07:21 11:33:05+02:00
File Creation Date/Time         : 2023:07:19 01:14:49+02:00
File Permissions                : -rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Make                            : Sony
Camera Model Name               : D5803
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : 23.5.A.1.291_6_f1000010
Modify Date                     : 2016:12:14 14:34:37
Y Cb Cr Positioning             : Centered
Sub Sec Time                    : 528036
Sub Sec Time Original           : 528036
Sub Sec Time Digitized          : 528036
Exposure Time                   : 1/500
F Number                        : 2.0
ISO                             : 50
Exif Version                    : 0220
Date/Time Original              : 2016:12:14 14:34:37
Create Date                     : 2016:12:14 14:34:37
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/498
Exposure Compensation           : 0
Metering Mode                   : Multi-segment
Light Source                    : Unknown
Flash                           : Off, Did not fire
Focal Length                    : 4.6 mm
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 3840
Exif Image Height               : 2160
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
Custom Rendered                 : Normal
Exposure Mode                   : Auto
White Balance                   : Auto
Digital Zoom Ratio              : 2.46
Scene Capture Type              : Standard
Subject Distance Range          : Unknown
Compression                     : JPEG (old-style)
Thumbnail Offset                : 796
Thumbnail Length                : 6806
Image Width                     : 3840
Image Height                    : 2160
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Aperture                        : 2.0
Image Size                      : 3840x2160
Megapixels                      : 8.3
Shutter Speed                   : 1/500
Create Date                     : 2016:12:14 14:34:37.528036
Date/Time Original              : 2016:12:14 14:34:37.528036
Modify Date                     : 2016:12:14 14:34:37.528036
Thumbnail Image                 : (Binary data 6806 bytes, use -b option to extract)
Focal Length                    : 4.6 mm
Light Value                     : 12.0


Working thumbnail:
ExifTool Version Number         : 12.64
File Name                       : DSC_0126_ThumbnailImage.jpg
Directory                       : .
File Size                       : 6.8 kB
File Modification Date/Time     : 2023:07:20 18:04:03+02:00
File Access Date/Time           : 2023:07:21 15:41:42+02:00
File Creation Date/Time         : 2023:07:20 18:04:03+02:00
File Permissions                : -rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Image Width                     : 160
Image Height                    : 120
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
Image Size                      : 160x120
Megapixels                      : 0.019

Using Windows, command line/powershell.
So how can I view the full size image, and not corrupted image ?

Phil Harvey

I am missing the point.  If the image is corrupted then presumably this is the same full-sized image that is corrupted.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Needhelp

So that means,

I can repair from corrupted thumbnail and corrupted full-size image to working thumbnail preview with 'exiftool -a -b -W %d%f_%t%-c.%s -preview:all DSC_0126.JPG'.

But repairing from corrupted full-size image to working full-size image, I must do it with another program (ex. Stellar, EaseUS, Picture Doctor, File Repair, JPEG Recovery Professional, PixRecovery, Tenorshare Photo Repair and so on).

Is this correct?

Phil Harvey

If the main image data is corrupted then there is no way to recover it in any type of image.

ExifTool will fix corrupted metadata, but if the image looks corrupted when you open it with an image viewer, then there is nothing you can do but try to recover lower-resolution versions (eg. PreviewImage if it exists).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).