Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Animated PNG (APNG) support #239

Closed
Rongronggg9 opened this issue Apr 25, 2021 · 10 comments
Closed

[Feature request] Animated PNG (APNG) support #239

Rongronggg9 opened this issue Apr 25, 2021 · 10 comments
Labels
enhancement New feature or request Fixed

Comments

@Rongronggg9
Copy link

Rongronggg9 commented Apr 25, 2021

In a comparison made between GIF, APNG and WebP, it was shown that APNG kept lower file size while keeping at least equal quality.
Wikipedia

Some animated stickers are distributed in APNG format instead of GIF (e.g. Line sticker), but this GUI could only recognize and process them as normal PNGs. I've noticed that both ffmpeg and ImageMagick (>=7.0.10-31) support APNG, which means that pre-processing and post-processing APNG in the similar way to GIF may be feasible.

@AaronFeng753 AaronFeng753 added enhancement New feature or request ★Announcement★ Announcement from developer and removed ★Announcement★ Announcement from developer labels Apr 25, 2021
@AaronFeng753
Copy link
Owner

ImageMagick (>=7.0.10-31) support APNG

ImageMagick barely supports APNG, but I found other tools by this guy: https://sourceforge.net/u/maxst/profile/

@AaronFeng753
Copy link
Owner

APNG support will be available in the next update
43eb050

@Rongronggg9
Copy link
Author

APNG support will be available in the next update
43eb050

That's awesome!

AaronFeng753 added a commit that referenced this issue Apr 27, 2021
@AaronFeng753
Copy link
Owner

Now it's available in the latest BETA version 🎉

Support this project on patreon:
https://www.patreon.com/aaronfeng

@Rongronggg9
Copy link
Author

It may wrongly insist that there are twice as many frames than what the APNG actually has.

For example, 377520094@2x.png is an APNG with 20 frames and will be splitted to 20 PNGs after starting processing (that's right). However, W2xEX will insist that the APNG has 40 frames. Once the first 20 PNGs are poccessed, it will try to process the last 20 PNGs, which do not exist, only to fail.
Renaming the extension to apng will not make any difference.

Screenshot

@AaronFeng753
Copy link
Owner

AaronFeng753 commented Apr 27, 2021

It may wrongly insist that there are twice as many frames than what the APNG actually has.

I download that image but I can't recreate this bug, this might be caused by GUI failed to delete .txt files generated by the disassembler. Could you check the splitFrames folder? And send me the full path of the splitFrames folder. @Rongronggg9

@AaronFeng753
Copy link
Owner

I tried several times but I still can't recreate this bug, but I found another one: e760d10

@Rongronggg9
Copy link
Author

Hmm... I did more tests and found it only occurs when choosing waifu2x-ncnn-vulkan as the engine. Path or detailed settings seem to be irrelevant.

this might be caused by GUI failed to delete .txt files generated by the disassembler. Could you check the splitFrames folder?

No .txt in the splitFrames folder.

Could you check the splitFrames folder?

Screenshot_1

And send me the full path of the splitFrames folder.

I've tried to place the image to different folders only to get the same result. Here's the full paths to splitFrames folders:

C:\Users\Rongrong\OneDrive\Sticker\Capoo\貓貓蟲-咖波 好運發大財 賀年貼圖\animation@2x\377520094@2x_png_splitFramesFolder_W2xEX
C:\Users\Rongrong\OneDrive\Sticker\Capoo\2x\animated\377520094@2x_png_splitFramesFolder_W2xEX
C:\Users\Rongrong\377520094@2x_png_splitFramesFolder_W2xEX

@AaronFeng753
Copy link
Owner

AaronFeng753 commented Apr 28, 2021

only occurs when choosing waifu2x-ncnn-vulkan as the engine

Okay, now I know what happened, you are using waifu2x-ncnn-vulkan engine and the Scale Ratio is 4x, so the engine need to process those frames 2 times to make it 4x larger, that's why current file progress shows 20/40, which means it just finished the first round(make the images 2x larger)

And the text box at the bottom is keep saying automatic retry, that means the engine is crashing and the GUI is trying to start it again.

In conclusion, you don't have enough VRAM or RAM, so the engine can't enlarge those images to 4x, this was not caused by any bug in the GUI, I just tested it and everything works just fine on my PC.

Just try another engine or change the engines settings.

Repository owner locked and limited conversation to collaborators Apr 28, 2021
@AaronFeng753
Copy link
Owner

Please create new issues if you found another bug or have other suggestions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Fixed
Projects
None yet
Development

No branches or pull requests

2 participants