Board index » delphi » DB JPEG Image. JPEG error #41 or JPEG error #52

DB JPEG Image. JPEG error #41 or JPEG error #52

I have created a component that stores and displays JPEG images in a
data aware control.

I get error #41 from Paradox tables when I try to display a record which
does not have a JPEG image and error #52 from Sybase when I try to post
the data.

My 2 questions are: Where can I find definitions of these error messages
since they seem to be raised in the JPEG.DCU file and I don't have the
source to that file and is there a way of preventing exceptions being
raised from within a compiled unit so I can ignore them?

Any help will be appreciated.

Thanks.

Rob.

 

Re:DB JPEG Image. JPEG error #41 or JPEG error #52


Hi Robert,

I'm also looking for definitions on jpeg exceptions with no luck until now,
you can hook any exception in any unit compiled or not using a try except
block.
If you do get the exception when running the program then you need to
disable brake on exception from your delphi options, or run it out from
delphi environment.

best regards
Johnnie

Quote
Robert Finlay wrote:
> I have created a component that stores and displays JPEG images in a
> data aware control.

> I get error #41 from Paradox tables when I try to display a record which
> does not have a JPEG image and error #52 from Sybase when I try to post
> the data.

> My 2 questions are: Where can I find definitions of these error messages
> since they seem to be raised in the JPEG.DCU file and I don't have the
> source to that file and is there a way of preventing exceptions being
> raised from within a compiled unit so I can ignore them?

> Any help will be appreciated.

> Thanks.

> Rob.

Re:DB JPEG Image. JPEG error #41 or JPEG error #52


Hi Robert,

I'm also looking for definitions on jpeg exceptions with no luck until now,
you can hook any exception in any unit compiled or not using a try except
block.
If you do get the exception when running the program then you need to
disable brake on exception from your delphi options, or run it outside from
delphi environment.

best regards
Johnnie

Quote
Robert Finlay wrote:
> I have created a component that stores and displays JPEG images in a
> data aware control.

> I get error #41 from Paradox tables when I try to display a record which
> does not have a JPEG image and error #52 from Sybase when I try to post
> the data.

> My 2 questions are: Where can I find definitions of these error messages
> since they seem to be raised in the JPEG.DCU file and I don't have the
> source to that file and is there a way of preventing exceptions being
> raised from within a compiled unit so I can ignore them?

> Any help will be appreciated.

> Thanks.

> Rob.

Re:DB JPEG Image. JPEG error #41 or JPEG error #52


Jpeg errors..
#41  read Pass the end of the image.
#51 invalid image..
 The most common problems are the use of  Tmemory streams and not placing
the
Seek(0,0) prior to doing so.
Quote
Robert Finlay wrote:
> I have created a component that stores and displays JPEG images in a
> data aware control.

> I get error #41 from Paradox tables when I try to display a record which
> does not have a JPEG image and error #52 from Sybase when I try to post
> the data.

> My 2 questions are: Where can I find definitions of these error messages
> since they seem to be raised in the JPEG.DCU file and I don't have the
> source to that file and is there a way of preventing exceptions being
> raised from within a compiled unit so I can ignore them?

> Any help will be appreciated.

> Thanks.

> Rob.

Re:DB JPEG Image. JPEG error #41 or JPEG error #52


Thanks for the reply.

I've followed your advice and got to the stage where the errors do not
appear but if you do find out the error numbers then I'd be very
interested to know what they correspond to.

Thanks.

Rob.

Re:DB JPEG Image. JPEG error #41 or JPEG error #52


Both D3 and D4 come with the source but it is on the CD in the info\extras\jpeg
directory.  I think D5 also, but I don't have that CD handy right now.  You can
also download the full JPEG Spec at
http://www.wotsit.org/cgi-bin/search.cgi?graphics.  

Quote
Robert Finlay wrote:

> I have created a component that stores and displays JPEG images in a
> data aware control.

> I get error #41 from Paradox tables when I try to display a record which
> does not have a JPEG image and error #52 from Sybase when I try to post
> the data.

> My 2 questions are: Where can I find definitions of these error messages
> since they seem to be raised in the JPEG.DCU file and I don't have the
> source to that file and is there a way of preventing exceptions being
> raised from within a compiled unit so I can ignore them?

> Any help will be appreciated.

> Thanks.

> Rob.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
This sad little lizard told me that he was a brontosaurus on his mother's
side.  I did not laugh; people who boast of ancestry often have little else
to sustain them.  Humoring them costs nothing and ads to happiness in
a world in which happiness is in short supply.
   (RAH)
--

Re:DB JPEG Image. JPEG error #41 or JPEG error #52


The source is in Info/Extras/Jpeg off the D5 CD (and similar in 4) if you
have Pro or C/S/Enterprise.

If you want to prevent them, then in any code that could raise a jpeg error
(such as loading from a stream or file), wrap it in a try...except, and
handle the EJPEG exception.

...corbin

Quote
Robert Finlay <robert.fin...@venton.co.uk> wrote in message

news:37FC7A53.294A@venton.co.uk...
Quote
> I have created a component that stores and displays JPEG images in a
> data aware control.

> I get error #41 from Paradox tables when I try to display a record which
> does not have a JPEG image and error #52 from Sybase when I try to post
> the data.

> My 2 questions are: Where can I find definitions of these error messages
> since they seem to be raised in the JPEG.DCU file and I don't have the
> source to that file and is there a way of preventing exceptions being
> raised from within a compiled unit so I can ignore them?

> Any help will be appreciated.

> Thanks.

> Rob.

Re:DB JPEG Image. JPEG error #41 or JPEG error #52


Thanks very much.

Rob.

Other Threads