ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Print area of image but floating point error.

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
adisonx Posted - Jan 26 2015 : 22:29:30
I want to print the area of image ,but I get "floating point invalid operation at 0x00a0fa06" error and here is my code.

if (this->ImageEnView->Selected) {



if (this->PrintDialog->Execute()) {
TImageEnIO* ImageEnIO = new TImageEnIO(this);
Printer()->Copies = this->PrintDialog->Copies;
TMemoryStream* mem = new TMemoryStream();
this->ImageEnView->SaveSelectionToStream(mem); //save area to temporary stream
mem->Position = 0;
Printer()->BeginDoc();
ImageEnIO->LoadFromStream(mem);
ImageEnIO->PrintImage(Printer()->Canvas, 0, 0, 0, 0, ievpTop,
iehpLeft, iesNormal, 0, 0, 1);
Printer()->EndDoc();

delete mem;
delete ImageEnIO;
}

}

What 's wrong with my code and how do I fix this. Thank you in advance.

---Update
My mistake SaveSelectionToStream method is only save the selection not image content,but how do I get image area content.
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 27 2015 : 13:02:32
Hi

Please use:

this->ImageEnView->IO->SaveToStream(mem);

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com