From: "Joe C. Hecht" Subject: Re: Bitmaps larger than screen size Date: 09 Jul 1999 00:00:00 GMT Message-ID: <37865A9C.6C0F@gte.net> Content-Transfer-Encoding: 7bit References: <3785AD1D.6174@REMOVECAPShotmail.com> Content-Type: text/plain; charset=us-ascii Organization: Offshore Technology Mime-Version: 1.0 Reply-To: joehecht@gte.net Newsgroups: borland.public.delphi.graphics Chad Jones wrote: > > I've read several posts (especially those of Joe Hecht) that recommend > not creating Bitmaps larger than screen size to avoid 'out of system > resources' errors. > > Q: Does this apply only to DDB TBitmaps or to DIB types also? You can create a DIB of any size, and blt only the protions you need at the time. Note that when I say DIB, I do not mean a TBitmap of type DIB, I mean a pointer to a DIB header, and a pointer to the image bits. This means you will have to develop your own LoadFromFile type functions, but you will get very reliable results if you follow the guideline of not blting a section thats larger than the screen, or bltting a section that requires more memory than a screen load. Final note: You see notably knowledgeable folks claiming this is related to video drivers, since, the situation on the largest sized bitmap seems to change when using different video drivers. Thats hogwash. If you look at the code in those drivers, you will notice that they simply ask the GDI or kernel for the necessary memory for the bitmap. When the request fails, you get trouble. There is an explanation of why it seems that different drivers can produce differing max sizes of bitmaps. It is influenced by the amount of GDI and/or kernel memory available at the time, and or the GDI failing a punted call. Also, differing capibility flags of the different drivers have a lot to do with how successfull certain GDI related calls will be. Joe -- Joe C. Hecht http://home1.gte.net/joehecht/index.htm