We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

JPEG

andrewyu
andrewyu asked
on
Medium Priority
414 Views
Last Modified: 2013-11-19
How can I verify a JPEG file is valid or not ? Because it will halt if I pass a file name of invalid JPEG file to LoadFromFile, so, how can I prevent it halt again !

Andrew
Comment
Watch Question

Hi Andrew
Use a try exception in ur code.Put ur Loadfromfile in the try block and a default jpg image in the exception block

Vijay
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
I understand, but, actually I want to know whether Delphi will raise a exception for a "BUG" JPEG file ?

Andrew

Commented:
use      with jpgimage     try jpgxx.loadfromfil...

bryan

Commented:
what kind of bugs ?

bryan

Author

Commented:
I meant a worong content of JPEG file !

Andrew
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.