No Limit for Images

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Thade
Enthusiast
Enthusiast
Posts: 266
Joined: Sun Aug 03, 2003 12:06 am
Location: Austria

No Limit for Images

Post 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
--------------
Yes, its an Irish Wolfhound.
Height: 107 cm; Weight: 88 kg
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: No Limit for Images

Post by Fred »

I don't think there is such limit anymore, i just tested CreateImage(0, 16000,16000) and it seems to work.
User avatar
IceSoft
Addict
Addict
Posts: 1690
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: No Limit for Images

Post 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.
Belive! C++ version of Puzzle of Mystralia
Bug Planet
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: No Limit for Images

Post by Fred »

It's a debugger only check
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: No Limit for Images

Post 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.
quidquid Latine dictum sit altum videtur
Thade
Enthusiast
Enthusiast
Posts: 266
Joined: Sun Aug 03, 2003 12:06 am
Location: Austria

Re: No Limit for Images

Post 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

.
--------------
Yes, its an Irish Wolfhound.
Height: 107 cm; Weight: 88 kg
Post Reply