How machine detects corrupted image automatically??
How machine detects corrupted image automatically??
When I wanted to identify corrupted image, the program ends with the last messages
identify: Premature end of JPEG file 'corrupt.jpg'.
identify: Corrupt JPEG data: premature end of data segment 'corrupt.jpg'.
where corrupt.jpg is name of the image I used.As I think, this gives the image is corrupted to the viewer.But now I wanted the machine to detect the corrupted image automatically as soon as the image is downloaded(e-mail attachments). What should I do? Is there any commands so that the machine detects the corrupted image? Please help!!
With Regards
Prakash Rai
identify: Premature end of JPEG file 'corrupt.jpg'.
identify: Corrupt JPEG data: premature end of data segment 'corrupt.jpg'.
where corrupt.jpg is name of the image I used.As I think, this gives the image is corrupted to the viewer.But now I wanted the machine to detect the corrupted image automatically as soon as the image is downloaded(e-mail attachments). What should I do? Is there any commands so that the machine detects the corrupted image? Please help!!
With Regards
Prakash Rai
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How machine detects corrupted image automatically??
Run identify on the downloaded image, junk its output and look at the commands return status.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How machine detects corrupted image automatically??
Thanks for your reply.
I issued the command as follows:
and I got the log.txt file. But I don't see any STATUS there. I am sure that corrupt.jpg file is a corrupted file. How and where can I check that status? What status I need to check ? Eagerly waiting for your reply!!
With Regards
Prakash Rai
I issued the command as follows:
Code: Select all
identify -verbose corrupt.jpg >log.txt 2>&1
With Regards
Prakash Rai
Re: How machine detects corrupted image automatically??
Type
- echo $status
Re: How machine detects corrupted image automatically??
Thank U once more for your quick response.
I tried but didn't get any status. The following is what I got.
/************************************************/
server:/home/proj/images # identify corrupt.jpg
identify: Corrupt JPEG data: premature end of data segment `corrupt.jpg'.
corrupt.jpg JPEG 406x491 DirectClass 67kb 0.010u 0:01
server:/home/proj/images # echo $status
server:/home/proj/images #
/***************************************************/
Actually we have Suse installed in out server and I am using SSH Tectia Client.
Thank you.
With regards,
Prakash Rai.
I tried but didn't get any status. The following is what I got.
/************************************************/
server:/home/proj/images # identify corrupt.jpg
identify: Corrupt JPEG data: premature end of data segment `corrupt.jpg'.
corrupt.jpg JPEG 406x491 DirectClass 67kb 0.010u 0:01
server:/home/proj/images # echo $status
server:/home/proj/images #
/***************************************************/
Actually we have Suse installed in out server and I am using SSH Tectia Client.
Thank you.
With regards,
Prakash Rai.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How machine detects corrupted image automatically??
What shell. if you are using bash use $? instead of $status
check you shell manual.
check you shell manual.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How machine detects corrupted image automatically??
Thanks for your response..I works for me..Status 1 is displayed when program terminates unexpectedly..But still could not able to get the status 1 with my image.I think the image is corrupted. Can you please try this with the following image? The link for the image is:
http://www.imageboo.com/images/551933corrupt.jpg
With Regards
Prakash Rai
http://www.imageboo.com/images/551933corrupt.jpg
With Regards
Prakash Rai
Re: How machine detects corrupted image automatically??
Use this command (requires a modern version of ImageMagick):
- identify -regard-warnings 551933corrupt.jpg
Re: How machine detects corrupted image automatically??
ThankYou very much for your great help!!
The command you specified worked for me..
With Regards
Prakash Rai
The command you specified worked for me..
With Regards
Prakash Rai
-
- Posts: 1
- Joined: 2011-11-12T10:59:01-07:00
- Authentication code: 8675308
Re: How machine detects corrupted image automatically??
With ImageMagick 6.6 only detect a corrupted image with the -verbose option.