how to detect corrupted file
jdd at dodin.org
jdd at dodin.org
Tue Apr 11 16:40:47 BST 2023
Le 11/04/2023 à 16:51, frederic chaume a écrit :
> What could help is to be able to validate the integrity of the
> collections and/or the backup. So if any idea is welcome
>
finally, jpeginfo is the tool of choice. Thanks you making me find this
utility (easily given by my openSUSE distribution)
https://github.com/tjko/jpeginfo
I take a random jpeg file:
Default jpeginfo result:
jdd at localhost:/data/temp-data> jpeginfo test-jpeginfo.jpg
test-jpeginfo.jpg 2048 x 1536 24bit N JFIF,ICC
336206
corrupting the file (removing some lines with vi and saving)
jdd at localhost:/data/temp-data> vi test-jpeginfo.jpg
Test for corruption:
jdd at localhost:/data/temp-data> jpeginfo -c test-jpeginfo.jpg
test-jpeginfo.jpg 2048 x 1536 24bit N JFIF,ICC
335104 WARNING Corrupt JPEG data: premature end of data segment
notice that the resulting file is a pretty valid jpg file (opens in
Firefox), but it'sd easy to see it's corrupted
https://www.cjoint.com/doc/23_04/MDlpNwARRtk_test-jpeginfo.jpg
jdd
--
mon serveur usenet: dodin.fr.nf
c'est quoi, usenet? http://www.dodin.org/wiki/pmwiki.php?n=Usenet.Usenet
More information about the Digikam-users
mailing list