Imported APNG files do not animate?

I'm having trouble getting .apng files to work - they preview correctly in Firefox (meaning when drag'n'dropped into a Firefox window, they animate the way they're supposed to) but when I drag'n'drop the same file into xcode, I see only the first frame. No animation. When previewing in a simulator, no animation - just a static sticker.


I know how to make animated sticker packs - I have two for sale already. For those, I used PNG sequences. I'm trying to use .apng files because I'm getting way better compression.


I've used PNG Animator as well as apngasm to create the .apngs, and they are all at or under 300 Kb in size, and under 600 pixels in size.

Is anyone successfully using .apng files for creating stickers?


KM

https://itunes.apple.com/us/app/markup-stickers/id1157027020?mt=8

UPDATE - the same files animate correctly in an iMessage timeline when sent as attachments (like animated GIFs)..so the files are good.

Also, it's not a size issue - one of them is 16 Kb, and about 400x260.


It's just Xcode that doesn't like them. 😟

It would be helpful to get a bug report filed with a sample project that exhibits this issue.

pdm, You're suggesting this is something that's supposed to work? I'll be happy to file a bug report. I was assuming I was doing something wrong, or creating the APNG files incorrectly. I couldn't find any examples, or samples, only sporadic posts about how it's supposed to work. The compression achieved using apngasm is outstanding, so it'd be great if we could get it working. KM

Well, an APNG (i.e. Animated PNG) is suppose to, you know, animate. 🙂 It sounds like yours aren't animating as you'd expect so I think there's a bug here. If there's something wrong with your APNG the tools should do a better job at telling you what's wrong with it, or if the image is correct but it's not correctly animating then the OS software may have a bug. It's a little hard to tell what's going on without something concrete for us to look at. The best way to do that is to build a small sample project and attach it to a bug report at bugreport.apple.com. Please post the bug number here when you have it and we can take a look to see what's going on.

Works for me. I've use PNG Animator for all my recent packs. You're correct, there's not a way to preview them in Xcode, but once you build the app, they should be playing fine.


Just a thought though, why not go with the recommended sizes instead of your own. 300 by 300 or 408 by 408. You mentioned yours are 400 by 260 so that might be part of the problem.

Thanks for the help..

I just ran off a test - new project, made a new .apng file of 408x408. No change.

Submitted bug report. #28664293

Fingers crossed!

KM

When you say it works when you "build the app", do you mean in a simulator? or on a device?


I haven't tried it on a device yet, but can tomorrow..

Always, always, test on your device. The Simulator is really not a proper test environment. Especially when you're having issues.


You should update that bug report to mention you didn't test on the device. Or just close it for now. Don't want to distract the engineers. Plus I think its safe to say using APNG's created from PNG Animator or other APNG assembly programs is working. A lot of people on the forums are doing the same thing. All my recent packs are using APNG's.


Give it a test on your device. I bet it works.

Just tested. Doesn't work on my devices, either. 😟


In Xcode, when looking at the Sticker Sequence info on the far right, where it says "Name", "Accessibility", etc, it says "Frames = 1".


If I change that value to a higher number, Xcode creates that number of blank frames for that particular sticker.


So it's seeing only one frame upon import.

Also, just confirmed it's not how I'm creating the apng files.


I just downloaded this one (https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png) and it behaves the same way - it animates in iOS and Mac OS Messages (and Firefox), but Xcode thinks it has only one frame.


When run in a sim or device, nothing happens. Static image.

GOT IT TO WORK!


I needed to import them as stickers, or static image files, and NOT as a sticker sequence, and also needed to name them .PNG and not .APNG.


thanks for helping me work through it, all!

Glad to hear you got it to work!

Imported APNG files do not animate?
 
 
Q