BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Valid JPEG image

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Tim
Guest





PostPosted: Thu Jul 06, 2006 7:49 pm    Post subject: Valid JPEG image Reply with quote



I have a program which includes adding images to certain records using the
TOpenPictureDialog box.

However, a client has has a problem and when I have tried to import his
image with the program running from the IDE, I get an error message 'project
raised exception class EJPEG with message 'JPEG error #53'. Process
stopped.' simply by highlighting the file in theOpenPictureDialog box.

I have then tried to open the image in Paint Shop Pro and got a 'This is not
a valid JPEG-JFIF file' error. However, the file opens OK in IrfanView and
in Internet Explorer.

Apparently this image came straight out of his camera.

The problem is that I don't know enough about image formats to know where
the error lies. Can anyone suggest how I might tackle this?

Thanks.
Back to top
David J Taylor
Guest





PostPosted: Thu Jul 06, 2006 8:22 pm    Post subject: Re: Valid JPEG image Reply with quote



Tim wrote:
[]
Quote:
However, a client has has a problem and when I have tried to import
his image with the program running from the IDE, I get an error
message 'project raised exception class EJPEG with message 'JPEG
error #53'. Process stopped.' simply by highlighting the file in
theOpenPictureDialog box.
[]
Thanks.

See:

http://homepages.borland.com/efg2lab/Library/Delphi/Graphics/JpegErrors.txt

It may tell you what the error means, although quite how to find where
it's happening may be another issue althogether.

David
Back to top
Finn Tolderlund
Guest





PostPosted: Thu Jul 06, 2006 8:48 pm    Post subject: Re: Valid JPEG image Reply with quote



"Tim" <tim (AT) evolvedatasystems (DOT) co.uk> skrev i en meddelelse
news:44ad2289 (AT) newsgroups (DOT) borland.com...
Quote:
I have then tried to open the image in Paint Shop Pro and got a 'This is
not
a valid JPEG-JFIF file' error. However, the file opens OK in IrfanView and
in Internet Explorer.

That might indicate that the jpeg is corrupt in some way.
Can you put it in b.p.attachments for us to see?
--
Finn Tolderlund
http://www.tolderlund.eu/delphi/
Back to top
Warrick Wilson
Guest





PostPosted: Thu Jul 06, 2006 10:32 pm    Post subject: Re: Valid JPEG image Reply with quote

"Tim" <tim (AT) evolvedatasystems (DOT) co.uk> wrote in message
news:44ad2289 (AT) newsgroups (DOT) borland.com...
Quote:
I have a program which includes adding images to certain records using the
TOpenPictureDialog box.

However, a client has has a problem and when I have tried to import his
image with the program running from the IDE, I get an error message
'project
raised exception class EJPEG with message 'JPEG error #53'. Process
stopped.' simply by highlighting the file in theOpenPictureDialog box.

I have then tried to open the image in Paint Shop Pro and got a 'This is
not
a valid JPEG-JFIF file' error. However, the file opens OK in IrfanView and
in Internet Explorer.

Apparently this image came straight out of his camera.

The problem is that I don't know enough about image formats to know where
the error lies. Can anyone suggest how I might tackle this?

Thanks.

When you open the image in Irfanview, have you looked at the
properties/image information about it? We had a problem once where we had a
CMYK-encoded JPEG, and the native jpeg.pas unit doesn't handle that. There's
a revised jpeg.pas unit on the CodeCentral site that _does_ work, and I
needed that to work with the CMYK JPEG. Our source wasn't a camera, though.

Does it only happen with images from his camera? Does it happen with all
images from his camera? If not, sound like you have a bad JPEG that some
programs can cope with better than others. If all images from his camera are
problematic, then try and figure out what the image properties are and see
whether your JPEG handling components/code are capable of that format.
Back to top
Tim
Guest





PostPosted: Fri Jul 07, 2006 9:26 pm    Post subject: Re: Valid JPEG image Reply with quote

Thanks for the comments. Without going to the site to see for myself where
the images come from, I am going to assume that the problem images did not
come his camera since someone else has taken some photos and they load fine.

I will, however, look at the revised jpeg.pas unit and see if that works.
However, if I can be sure that it was an image from a one off source and was
corrupt in some way, then I will leave it at that.

Tim
Back to top
Mikael Stalvik
Guest





PostPosted: Sat Jul 08, 2006 1:50 pm    Post subject: Re: Valid JPEG image Reply with quote

Quote:
I will, however, look at the revised jpeg.pas unit and see if that
works. However, if I can be sure that it was an image from a one off
source and was corrupt in some way, then I will leave it at that.

Can any one share the link to this updated version of jpeg.pas?
I found one related (?) file at CodeCentral,
"19723_enhanced_jpeg_implementation.ZIP", but it only contained .dcu
files, no .pas files :|

Is this the correct one to use?

Thanks,
Mikael
Back to top
Tim
Guest





PostPosted: Mon Jul 10, 2006 3:02 pm    Post subject: Re: Valid JPEG image Reply with quote

Mikael,

If you look in the zip file, there is a test.exe. I have just tried using it
to load the image that was causing me a problem and it comes up with an
error, so assuming that you were interested in it for the same reason as me,
then don't bother!

Tim


"Mikael Stalvik" <mikael@helium-music-manager.com> wrote in message
news:44af71c9$1 (AT) newsgroups (DOT) borland.com...
Quote:
I will, however, look at the revised jpeg.pas unit and see if that
works. However, if I can be sure that it was an image from a one off
source and was corrupt in some way, then I will leave it at that.

Can any one share the link to this updated version of jpeg.pas?
I found one related (?) file at CodeCentral,
"19723_enhanced_jpeg_implementation.ZIP", but it only contained .dcu
files, no .pas files :|

Is this the correct one to use?

Thanks,
Mikael
Back to top
Mikael Stalvik
Guest





PostPosted: Mon Jul 10, 2006 6:41 pm    Post subject: Re: Valid JPEG image Reply with quote

Thanks for the tip Tim.

Strange though, the test application works fine for me :)

Regards,
Mikael

Quote:
If you look in the zip file, there is a test.exe. I have just tried
using it to load the image that was causing me a problem and it comes
up with an error, so assuming that you were interested in it for the
same reason as me, then don't bother!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.