P
P
Petr Alexandrovich2016-09-02 22:53:28
Data recovery
Petr Alexandrovich, 2016-09-02 22:53:28

How to check jpg files (pictures) for integrity?

There are a large number of images that need to be (preferably in batch) checked for integrity, that is, whether the files are broken. How can I do that?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
X
xmoonlight, 2016-09-02
@xmoonlight

Load using any image processing library (for PHP: GD, for example) and determine the size of images: if there is an error during loading or incorrect (not expected) sizes, then the picture is "broken".

G
GenuZ, 2018-06-18
@GenuZ

Long searched for options.
There is a cross-platform option - ImageMagick :
Or the pure Windows console utility jpegtest :
To batch process, it makes sense to do something with searching for files, passing their names to the program and recording the output.
I saw the possibility of displaying broken images in AntiDupl.NET , but this is not its main functionality.
There is another gui-utility for verification, but it is paid and is no longer sold/supported - ImageVerify/ImageVerifier. And the demo version that is still downloaded from third-party resources scans an extremely small limited number of files.

D
Dimonchik, 2016-09-02
@dimonchik2013

https://docs.python.org/3.5/library/imghdr.html

E
Eugene Parasyuk, 2016-11-03
@comphome

But what about similar software under Windu?

Y
Yuri Alexandrovich Morozov, 2021-03-21
@moroz69off

For what purpose are you interested?
Just I would like to complement GenuZ's correct answer . All of a sudden you need more.
There are some nuances: if you need to ensure image integrity for your own REPUTATION, that's one thing, then GenuZ's answer is correct, ImageMagick (or similar software) should work on every self-respecting server.
If you need to ensure your own SECURITY, then this is another case. Then read this , specifically on your question - Exploit protection , if you had to be interested in the integrity of images from the security side, then it would not be superfluous to read all the sections.
Microsoft also says this:
Important!
Image file execution options only allow you to specify the file name or path, not the version number, architecture, or any other differentiator. Be careful to target mitigation for applications with unique names or paths, only applying them on devices where you have tested that application version and architecture.
Good luck to you! And safe clouds!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question