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 / Error but only on one device - 'Image does not contain enough animation frames'

Author
Message
Stoikkas
6
Years of Service
User Offline
Joined: 18th Jan 2018
Location:
Posted: 18th Jan 2018 00:44
Hi all,

I have a problem with my app.
I have tried it on 7 different devices and it works nicely on 6.
On the 7th i throws up the error 'Image does not contain enough animation frames bubble-133.png in functions.agc at line 191'.
This animation works fine on the other devices.
The image that it is talking about is 2660x133 and has 20 frames.
The device is running android v4.2.1 and is an ASUS Transformer Pad.
The majority of the other devices (that it works on) are android, some new and some older.
I have made sure that the AppGameKit Player is fully up to date.

Has anyone else come across a simular issue?

Many thanks
Phil

Stoikkas
6
Years of Service
User Offline
Joined: 18th Jan 2018
Location:
Posted: 18th Jan 2018 13:21
UPDATE:
I have changed the file size so that the frames are set over 2 rows so the image is 1330x266 and it has fixed the problem.

Does anyone know if there is a width limitation on images used for animations?

Many thanks
Phil
Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 18th Jan 2018 13:42
at this device the GetImageWidth said also 2660 pixels?
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Stoikkas
6
Years of Service
User Offline
Joined: 18th Jan 2018
Location:
Posted: 18th Jan 2018 13:52
@Markus

Hi Markus, I have just checked the GetImageWidth and it shows as 2048 on the asus transformer but 2660 on the other devices.
Why would it do that? Very strange.

Thanks for the reply.

Phil
Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 18th Jan 2018 15:47 Edited at: 18th Jan 2018 16:08
hm, maybe a texture size limit with power of 2.
some behavior can not explained.
instead of 2048 i would expect a error at image loading.
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 18th Jan 2018 15:53 Edited at: 18th Jan 2018 15:56
I remember reading in the documentation to keep your images at 2048x2048 or smaller because for many devices (I am guessing mainly these would be cell phones) that is the max size supported. So I'd guess that is it based on the initial behavior and the fact it now works after changing size to be within 2048x2048.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 18th Jan 2018 16:07 Edited at: 18th Jan 2018 16:07
Quote: "reading in the documentation"

yes here
https://www.appgamekit.com/documentation/Reference/Image/LoadImage.htm
Quote: "
LoadImage
Description

Loads an image from a file into a specified image ID, can also be used to load an atlas texture that will be used by sub images. If loading an atlas texture a subimages.txt file must exist detailing all the images contained on it.

Image width and height must be between 1 and 2048 pixels, some devices may support larger sizes but this is not guaranteed. Images do not need to be a power of 2 in size (2,4,8,16,32,etc).

If you have lots of small images you could combine them into an atlas texture to improve performance."
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Stoikkas
6
Years of Service
User Offline
Joined: 18th Jan 2018
Location:
Posted: 18th Jan 2018 16:10
Thanks for you help guys.

Ill keep my images no bigger than 2048x2048 from now on.

Thanks again!
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 19th Jan 2018 10:54 Edited at: 19th Jan 2018 10:54
The erroneous device probably expands the 2660 image to a power of 2 image size of 3072pixels wide, making it too big to fit into memory.

Just an explanation of why it doesn't work.
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 20th Jan 2018 06:59
I think I'm facing a similar problem with one device. How can I read from 2 rows using SetSpriteAnimation()?
Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th Jan 2018 12:30
Quote: "How can I read from 2 rows using"


Quote: "When it reaches the right hand side of the image it will begin again one row down, moving from left to right again until the frame count is reached or it runs out of space on the image to look for frames. "
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 20th Jan 2018 16:22
Thank you Markus!

Login to post a reply

Server time is: 2024-03-29 12:24:41
Your offset time is: 2024-03-29 12:24:41