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

Request APNG Merge function for Animat image #149

Closed
SaferSky opened this Issue Sep 28, 2016 · 11 comments

Comments

Projects
None yet
3 participants
@SaferSky

SaferSky commented Sep 28, 2016

I am not sure if you know this software: PxivAnimatDownloader.
It could download Animat images as ZIP file, or merge them into a GIF or APNG file.
It would be so nice if you can include such function in your program :D

@Nandaka

This comment has been minimized.

Owner

Nandaka commented Sep 28, 2016

only gif is supported.

set creategif=True in config.ini

@SaferSky

This comment has been minimized.

SaferSky commented Sep 28, 2016

Eh, the true is, I want images in loseless format...
I am not a programer, so maybe you can try this software and see if you can add more features on yours XD.
Links here: https://app.box.com/s/b8msix7up2uhb6tqtaxgdu9n6qf2oepr

@Nandaka

This comment has been minimized.

Owner

Nandaka commented Oct 18, 2016

If you want to use lossless format, the better keep the ugoira file and use http://www.bandisoft.com/honeyview/ to view it.

@photonometric

This comment has been minimized.

photonometric commented Oct 18, 2016

I wasn't aware of the conversion issue, but was just catching up on some of the previous work in the area....

Personally I would like to see APNG as well, since GIF is basically the worst we have and is only still a thing because it's animated. Are you saying that none of the previous tools work to save the original zipped images? Or does that encryption get in the way of conversion? Or does conversion depend too much on clunky UI software?

Two years ago, the kids on Bandisoft's Honeyview forum were putting all their hopes in PixivUtil finding an elegant solution to this awkward problem. Is there not some way that, being able to get to GIFs as we do, we cannot convert to PNG instead?

@Nandaka

This comment has been minimized.

Owner

Nandaka commented Oct 18, 2016

set createugoira = True in config.ini, it will create .ugoira file, which can be opened in honeyview.

basically .ugoira is a zip file with animation metadata inside.

@photonometric

This comment has been minimized.

photonometric commented Oct 18, 2016

basically .ugoira is a zip file with animation metadata inside.

Sure! My understanding is that it is something like a slideshow more than film, with the JS able to manipulate things like freeze-frames on the millisecond level.

I just unzipped one of the .ugoira files I downloaded today, and it's a series of 154 small JPEGs with 24 bit color depth. I think the reason we (and everyone) wants APNG is because it's another common format that supports GIF-like animation, conversion from other files like JPEG would be lossless in terms of detail, and is capable of representing truecolor in either 24 or 48 bits. GIF's paltry 255 colors, besides the obvious loss of detail when losing the color depth, can easily create gradient tears in anime/manga-style drawings.

You know all this....so what I'm wondering is, with a .ugoira full of JPEGs or PNGs and a JSON file telling each one when to flick....why are the current GIF animation converions possible, while you seem to be saying that conversion to a largely superior file format is only possible inside the viewer software?

@Nandaka

This comment has been minimized.

Owner

Nandaka commented Oct 18, 2016

current GIF animation converions possible

because there is a library supporting the conversion (imageio) from individual image to gif, and apng is not that common. Unless there is a python library that can convert individual images to apng, then I might give a shot.

@photonometric

This comment has been minimized.

photonometric commented Oct 18, 2016

Hmm, let's see. Actually FFmpeg can do it, though perhaps not with the control necessary to decode the JS files?

I'm not sure what kind of library would work for you; there's quite a bit of overlap between PNG and APNG (or more properly, MNG), because MNG is really just a wrapper for PNG files. This page is overflowing with technical information which might help you, though I think the practical answer will be on the Libraries and Toolkits page, with many libraries combining what seem to be the basics of PNG with some "video"control.

FreeImage has had libMNG it built-in since v2, though in 3.15.2 they removed dependency so the library could handle it internally like this?.

Not sure if any of that catches your fancy, but might be worth looking over to help everyone retain their porn colors ;3

@Nandaka

This comment has been minimized.

Owner

Nandaka commented Oct 18, 2016

Well, I don't call the freeImage dll directly, as I'm using imageio feature.
https://github.com/Nandaka/PixivUtil2/blob/master/PixivHelper.py#L642

which doesn't support apng as far as i know.

EDIT: It is possible to write as mp4 using ffmpeg plugin inside imageio, but with fixed fps

@Nandaka

This comment has been minimized.

Owner

Nandaka commented Oct 20, 2016

ok, found the library for apng,

APNG support via Pillow https://pypi.python.org/pypi/apng/0.1.0

EDIT: crap, python 3.x only...

Nandaka added a commit that referenced this issue Dec 4, 2016

Implement #149
note: the generated apng is not optimized (library limitation)

@Nandaka Nandaka added the Enhancement label Dec 4, 2016

@Nandaka

This comment has been minimized.

Owner

Nandaka commented Dec 4, 2016

set createApng=True in config.ini.

Note: the generated png is not optimized due to library limitation.

@Nandaka Nandaka closed this Dec 4, 2016

Nandaka added a commit that referenced this issue Mar 4, 2017

Implement #149
note: the generated apng is not optimized (library limitation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment