Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GetImage or SaveImage size restrictions?

Author
Message
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 26th Apr 2015 21:08
I've written a program that compiles atlas images. Works fine with smaller image sizes but when I try for larger images (eg outputted atlas image 2500px wide) the resulting image is only 1120px wide? Pretty sure code is correct so wondering if anyone knows of image size restrictions with these two commands: GetImage and SaveImage.

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 26th Apr 2015 21:25
Does anyone know if these commands have similar size restrictions?

SetRenderToImage( colorImage, depthImage )
integer CreateRenderImage( width, height, format, mipmap )

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 26th Apr 2015 21:29
The limits are probably different for each platform. Maybe the maximum size of the back-buffer.

xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 26th Apr 2015 21:37 Edited at: 26th Apr 2015 21:38
As I recall, GetImage's coordinates are based on the actual device resolution so trying to get an image greater than that will not work as intended. It is pretty confusing and not very desirable for many use cases. The help states:

Quote: "Note that the image produced by this command is not guaranteed to have the same width and height as those given to the command, this is because the image is created from a portion of the screen which has a different size on different devices. For example, with a virtual resolution of 480x360, you would get an image of the full screen by calling this command with a width of 480 and a height of 360, but on an iPod this would produce an image of 480x360 pixels, whilst on an iPad it would be around 1024x768 pixels."


Render Images are also currently restricted to powers of 2 on mobile or bad things happen. Paul mentioned this may be amended as part of the 3D command work but who knows when that may be. Due to these problems I can't create particular applications I had in mind using AppGameKit and must use an alternate platform.

You could likely create the final image at the intended resolution using memblocks but that obviously gets more complicated.
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 26th Apr 2015 21:41
Looks like a 2048x2048 limitation on the two commands listed above - shame!

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 26th Apr 2015 21:42
PC - so I expected much larger for the render commands.

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 27th Apr 2015 01:41
These are platform restrictions - not AppGameKit as such. Smaller device will not allow sizes > 1024 x 768.

<<It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.>> Dijkstra
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Apr 2015 10:46
I create huge atlas images using the memblock commands. I've made images that way over 5000 pixels wide and high. There's not much point though if you are going to be putting those images into a mobile app where 1024x1024 is the only safe maximum.

Using AppGameKit V2 Tier 1
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 27th Apr 2015 16:28
I'm only targeting PCs/Macs for this game so larger atlas maps would be fine I'm guessing? I've never used memblocks before so might have to start looking into those. For now, unless performance because I'm using several images for sprites starts to dip, I'll stick with my current method but thanks for letting me know about this Baxslash - good to know that I have an option there.

You're a truly knowledgeable person to have around!

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Apr 2015 16:41
I'll be happy to share some code if you need it. Just mail me.

Using AppGameKit V2 Tier 1
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 28th Apr 2015 14:09
That's very kind Baxslash. Will do if I go the memblock route. Thanks.

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 12th Jun 2015 20:38
Hi Baxslash,

I'm coming up against some strange issues using images so keen to take a look at your memblock route if possible?

Cheers.

Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)

Login to post a reply

Server time is: 2024-03-28 23:52:04
Your offset time is: 2024-03-28 23:52:04