Board index » delphi » Bad JPEG error in Delphi 3

Bad JPEG error in Delphi 3

There was a thread a month or two back about Delphi 3's inability to
trap the error caused when a bad JPEG file is loaded. I have the first
two responses in which two possible fixes were proposed to the
JPEG.PAS file. I  have tried them both with no luck. I never got to
see if there were any other responses to this problem.

Does anyone know how to solve this? I am using the format:

try
  JPGImg.LoadFromFile('MyJpeg.jpg');
except
  {do my error processing here - but I never get to here!}
end;

Russ

 

Re:Bad JPEG error in Delphi 3


To my knowledge this problem has never been solved completely.  Neither
solutions will catch all errors.  In part some "errors" are in fact
compression types that are not supported by the JPEG unit.  Keep in mind
that these errors (#69 I think) are NOT errors.  You just don't have the
ability to display them.  I, and others, would love a solution to this
problem.  So far no luck.

Donn

Quote
<r...@irwinware.com> wrote in message 35a03608.6672...@forums.borland.com...
>There was a thread a month or two back about Delphi 3's inability to
>trap the error caused when a bad JPEG file is loaded. I have the first
>two responses in which two possible fixes were proposed to the
>JPEG.PAS file. I  have tried them both with no luck. I never got to
>see if there were any other responses to this problem.

>Does anyone know how to solve this? I am using the format:

>try
>  JPGImg.LoadFromFile('MyJpeg.jpg');
>except
>  {do my error processing here - but I never get to here!}
>end;

>Russ

Re:Bad JPEG error in Delphi 3


On Mon, 6 Jul 1998 01:17:09 -0700, "Donn Ault"

Quote
<au...@NOSPAMalpinemeadow.com> wrote:
>To my knowledge this problem has never been solved completely.  Neither
>solutions will catch all errors.  In part some "errors" are in fact
>compression types that are not supported by the JPEG unit.  Keep in mind
>that these errors (#69 I think) are NOT errors.  You just don't have the
>ability to display them.  I, and others, would love a solution to this
>problem.  So far no luck.

The particular error in this case is #52.  Do you, or anybody, know if
there is a way to check the JPEG *before* loading it to determine if
it is a valid JPEG?

Thanks,
Russ

Other Threads