?
Solved

Creating large bitmaps: "Incorrect parameter" crash on Win98

Posted on 2003-03-13
5
Medium Priority
?
153 Views
Last Modified: 2010-04-04
A code like this

...
    tmpBitmap := TBitmap.Create;
    tmpBitmap.Width := AnotherImage.Width;
    tmpBitmap.Height := AnotherImage.Height;
...

crashes when the Height is assigned. If I swap lines with Height and Width, then it crashes when assigning Width. Obviously, when TBitmap tries to resize itself to this new size, there is not enough resources.

Any suggestions leading to changing the image itself (like decreasing image quality) are not acceptable.

It looks like limitation of the system, but if somebody knows how to work around it, I'll gladly award 250 points for that.

Thank you.
0
Comment
Question by:rublin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 8134181
I've seen another question about this.  I can't remember the solution though....  I'll see if I can find something on it.
0
 
LVL 6

Accepted Solution

by:
Stuart_Johnson earned 1000 total points
ID: 8134191
http://homepages.borland.com/efg2lab/Graphics/VeryLargeBitmap.htm

From this whitepaper:

When I tried to:
   Bitmap.Width := W;
   Bitmap.Height := H;                                
   Bitmap.PixelFormat := pf24bit;

I got Out of Resources in large bitmaps.

But when i modify the code to:

   Bitmap.PixelFormat := pf24bit;
   Bitmap.Width := W;                                
   Bitmap.Height := H;

I'm not sure if this will fix your problem, but at least you'll know you're not alone in the world :)

Stuart.
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 8134198
(I think I missed some of the comment when I copied that out of the document.)
0
 

Author Comment

by:rublin
ID: 8144885
Thanks. It helped.
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 8145787
Thanks, Rublin!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question