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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 access violation using CopySelectionToIEBitmap
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Aug 20 2013 :  10:59:25  Show Profile  Reply
I am using ImageEn 4.3.1 to compile an older version of ImageEn but where the code uses CopySelectionToIEBitmap, it throws an access violation. How do I avoid this issue?

Thanks.

w2m

USA
1990 Posts

Posted - Aug 20 2013 :  12:49:49  Show Profile  Reply
If I understand correctly, you are trying to compile an imageen application that used an older version of ImageEn, but you are getting an access violation when calling CopySelectionToIEBitmap.

Is there a selection when you call CopySelectionToIEBitmap?

Post some code so we can see what is going on.

William Miller
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Aug 26 2013 :  03:27:07  Show Profile  Reply
Hi William, there is a selection either ellipse or rectangle, but it looks like it is a memory issue when it bombs out with "Not enough space to render...blah blah blah". I admit the image was large, but when ran with no other programs opened, it worked. So, is there a way to avoid the memory limitations in any way? Hardware-wise, the computer had 16 Megs of RAM, so I think the equipment is more than adequate.

Thanks William.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Aug 26 2013 :  04:27:44  Show Profile  Reply
A memory problem is not necessarily a physical ram problem... Windows Bitmaps have a limit of about 2-3.8 GB with 32-Bit OS, but the latter requires a define to implement.

The 32-bit define is put in the dpr file:
program Project1;
uses
  Windows,
  Forms,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
{ Provide up to a maximum of 4 GB memory in 32-Bit application }
begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.Title := 'Threaded Image Rendering With ImageEn';
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
If this is causing the problem you can either use smaller bitmaps, implement the define, or probably the best thing is to compile as 64-bit. To compile as 64-bit you need one of the more modern versions of Delphi and you need to put the ielib64.dll in the folder containing the exe.

So my question is, what are the dimensions of the image?

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

xequte

39061 Posts

Posted - Aug 27 2013 :  01:46:59  Show Profile  Reply
Sorry can you explain this in more detail:

"I am using ImageEn 4.3.1 to compile an older version of ImageEn"

Have you tried stepping through the code (ImageEn source) to see where the A/V is arising?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: