How to determine if a photo is damaged?

I have a requirement when I have to determine if the image is damaged and, accordingly, mark it as such.

Another thing, I need to determine if the image has the wrong extension. What I mean by the wrong extension is that sometimes I came across a photo with the jpg extension, but when I upload this photo to IrfanView, it reports that the photo is in a different format, that extension.

How to do it in Delphi.

+2
source share
3 answers

I have a requirement when I have to determine if the image is damaged and, accordingly, mark it as such.

, (, BMP, JPEG ) , . - (TJpegImage, TPngObject ..). , . , , , . JPEG, Delphi TImage Windows Image Viewer, . BMP : , , . , ?

, , . , , - , jpg, IrfanView, , , .

- , , , , ? .

. , . , 4 . , .

+13

, , - , , .. BMP BMP BMP-, BMP- .. -, . , , , , CRC32, MD5 SHA1. , .

Delphi jpeg TJPEGImage TBitmap. . , .

, , . , GIF GIF, BMP BM, JPEG JFIF. , unix file .

+2

"", , -, , . , , .

IMO, . , . .jpg, , ? a.jpg, , "" , - ( , , ), ? .jpg . "" ? , .

+2

All Articles