Page 1 of 1

No Limit for Images

Posted: Mon Feb 11, 2013 4:33 pm
by Thade
Hello

Would it be possible to drop the 8192x8192 Limit for Images?
Working with 3D-Panoramas 16384x8192 i.e. is not possible at present.
Computers are more powerful than in 2000 - what may have had a reason 10 years ago may not be relevant these days anymore.
Fred, can you please check if it is possible to replace the limitation to a much higher value (32768 at least) in case a limitation is needed at all?

Thank you
RGR

Re: No Limit for Images

Posted: Mon Feb 11, 2013 5:00 pm
by Fred
I don't think there is such limit anymore, i just tested CreateImage(0, 16000,16000) and it seems to work.

Re: No Limit for Images

Posted: Mon Feb 11, 2013 5:47 pm
by IceSoft
Fred wrote:I don't think there is such limit anymore, i just tested CreateImage(0, 16000,16000) and it seems to work.
The hardcoded? limit is 32000 x 32000 Pixels

look here:

Code: Select all

[17:46:31] Waiting for executable to start...
[17:46:31] Executable type: Windows - x64  (64bit)
[17:46:31] Executable started.
[17:46:31] [ERROR] Line: 14
[17:46:31] [ERROR] Image 'Height' is > 32000 pixels.

Re: No Limit for Images

Posted: Mon Feb 11, 2013 5:59 pm
by Fred
It's a debugger only check

Re: No Limit for Images

Posted: Mon Feb 11, 2013 8:51 pm
by freak
It seems impossible to create an image with pixel data that is >2GB big, even using the x64 version. So an image of 23170x23170 works here, larger does not. You can go wider if you reduce the height.

I checked the code, this is not a PB limit. Seems the API cannot handle more. I didn't find any docs on this though. So it is hard to tell if this is a hard limit. This all applies to the Windows version only of course.

Re: No Limit for Images

Posted: Tue Feb 12, 2013 2:47 am
by Thade
Thank you both for the info

I now see that the documentation says "at least"
I overread that in the hurry looking into it - I just saw that 8192x8192

CatchImage( ...)
CreateImage( ...)
LoadImage( ...)
ResizeImage( ...)
The limit for the image size that can be handled depends on the operating system and the available amount of memory. If enough memory is available, then images up to at least 8192x8192 are can be handled by all operating systems supported by PureBasic.
Maybe "up to 32768x32768" should be mentioned in the documentation as well to make it more obvious.

RGR

.