Corupted image in RichEdit

General TRichView support forum. Please post your questions here
Post Reply
jp
Posts: 24
Joined: Thu Oct 20, 2005 11:29 am

Corupted image in RichEdit

Post by jp »

Hello
I'm niw to this forum and new to Richview, so please bearwith mee if I ask stupid questions ;-)

In application, witch I do some upgrating on, I get a corupted image. But unfortunaly it's not every time.

Have any one seen this before and could you please give me a direction witch I have toe look for a solution?

Image

JP
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If documents are stored in RVF format, images are stored using graphic.SaveToStream and LoadFromStream methods. So the problem should be in the graphic class used for this picture.
Or do you use RTF?
jp
Posts: 24
Joined: Thu Oct 20, 2005 11:29 am

Post by jp »

Sergey Tkachenko thanks for your reply.

Yes it is a file in rvf format.

What happens is. Someone external are creating a rvf file using the ActionTestD2007 from you Demos. In this file are some jpg images.

In the application I'm updating this file is been shown in a RichviewEdit. I have debugged an came to a point where I got this error message:
"Poject ef33.exe raised exception Class EJEG with message 'JPEG error #68'."

This error comes in the RVItem.pas in the Procedure DrawImage at the line "Canvas,Draw(x, y, Image);"

Can someone give me a direction to for this error?

Thanks

JP
Pieter Zijlstra
Posts: 42
Joined: Sat Oct 08, 2005 3:56 pm
Location: The Netherlands
Contact:

Post by Pieter Zijlstra »

jp wrote: In the application I'm updating this file is been shown in a RichviewEdit. I have debugged an came to a point where I got this error message:
"Poject ef33.exe raised exception Class EJEG with message 'JPEG error #68'."

This error comes in the RVItem.pas in the Procedure DrawImage at the line "Canvas,Draw(x, y, Image);"

Can someone give me a direction to for this error?
http://dn.codegear.com/article/20433

Error 68 is 'Virtual array controller messed up'

Whatever that means :?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

It's something wrong with TJPEGImage, unfortunately I do not know what to do with it.
TRichView only stores images using their SaveToStream/LoadFromStream methods, and draws using Canvas.Draw and Canvas.StertchDraw...
jp
Posts: 24
Joined: Thu Oct 20, 2005 11:29 am

Post by jp »

Thanks Sergey and Pieter for helping me out.

I have found the reason for this behavior. I was copying a part out of a stream on basis of an token and this token was also found in the binary from the jpeg :-(

Thus no problem with Richview :-)

Thanks

JP
Post Reply