Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, December 9, 2015 9:00:04 AM(UTC)
tteveris

Groups: Registered
Posts: 32


I'm chasing down a memory issue and see that L_CreateLeadDC() fails. So would it be possible to explain what this function does in terms of memory allocation. The image I create using L_CreateBitmap() is 16000x18000 pixels and is of TYPE_DISK. The application is 32 bit.

Many thanks
T
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, December 10, 2015 1:23:57 AM(UTC)
Faris Shahin

Groups: Registered, Tech Support
Posts: 26


T,
L_CreateLeadDC() creates a device context using the specified bitmap as the display surface. This function will use memory even if the bitmap is of TYPE_DISK, so it is likely to always fail in a 32-bit application if the bitmap is huge like the one you created.

Why do you need to use the DC in this case? Are you going to draw some objects or text on the bitmap? If yes do you need to draw on the entire bitmap (huge objects) at the same time?

If you are going to draw on a small part of the image, create a small temporary bitmap, fill it with suitable color and draw on it, then combine it with the main bitmap.
Faris Shahin
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Thursday, December 10, 2015 3:16:07 AM(UTC)
tteveris

Groups: Registered
Posts: 32


Thanks for the quick reply - I need to draw on the entire surface. So with that I just report an "out of memory" to the user. Again thanks
 
#4 Posted : Sunday, December 13, 2015 5:16:13 AM(UTC)
Faris Shahin

Groups: Registered, Tech Support
Posts: 26


Or consider upgrading your application to use our 64-bit libraries. This should drastically increase its ability to handle larger images.
Faris Shahin
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.128 seconds.