how to detect corrupted file

Gilles Caulier caulier.gilles at gmail.com
Mon May 15 15:38:20 BST 2023


Hi all,

Just for info, we have an entry in bugzilla about this topic:

https://bugs.kde.org/show_bug.cgi?id=424441

Best

Gilles Caulier

Le ven. 28 avr. 2023 à 03:28, jdd at dodin.org <jdd at dodin.org> a écrit :
>
> 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