VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1234[5]678910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 06:47:28 09/12/02 Thu
Author: Michel
Subject: Re: Error message : EOutOfResources. 'The parameter is incorrect.'
In reply to: Brent Duguay 's message, "Error message : EOutOfResources. 'The parameter is incorrect.'" on 19:10:49 09/10/02 Tue


Hi,

The parameter is incorrect message is very misleading. This seems to be that windows cannot allocate the memory block to a handle the image.

I did a few searches on groups.google.com and this looks like a windows limitation:

<<

To clarify, it's not Borland's TBitmap, it's windows itself. I encountered
similar problems a few months back.

There were many posts on this newsgroup in about June/July 99 discussing
large bitmaps and how windows deals with them (or not, as the case may be),
the upshot of which was basically that for really big bitmaps (>1000 pixels
on a side, though this varies depending on the colour depth of the image)
things get rather unpredictable.

(see http://www.efg2.com/lab/Graphics/VeryLargeBitmap.htm for some further
discussion/links on this subject. The code snippets are in delphi, but you
should be able to figure it out)

Also, be aware that the limits will probably vary from machine to machine,
since there's an influence from video drivers/cards.
>>

The only workaround may be to load the graphic in another way. Try first loading it directly in a TBitmapGraphic then assigning to the TImageScrollBox. ie,

BitmapGraphic := TBitmapGraphic.Create;
BitmapGraphic.LoadFromFile(FileName);

ImageScrollBox.Graphic := BitmapGraphic;

BitmapGraphic.Free;

I am not sure this will work.

Best regards,

Michel

>Hi,
>
>I get the following message:
>
>"Project project1.exe raised exception class
>EOutOfResources with message 'The parameter is
>incorrect.'. Process Stopped."
>
> when trying to load a bitmap image from a file when
>the image size is larger than 3MB.
>
>The line it shows is :
>DibGraphic.Assign(Picture.Graphic); from
>TImageScrollBox.LoadFromStream in module EnImgScr.
>
>I have no difficulties when loading a bitmap image
>with a smaller size but it when the size is above 3MB
>I get the error.
>
>Is there something I'm missing, like a parameter or
>property setting, that will fix this error. I've
>checked the help file and found nothing.
>
>Thanks.
>Brent Duguay

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.