People,
I have been happily using a script for some time now that converts scanned, single PNGs into an MNG file and viewing this with either "display" or "mplayer" but now I need to be able to convert some MNGs back into their individual PNG files but this:
convert test.mng t_%d.png
only produces one PNG file (the MNG was constructed with 3 PNGs using convert). Trying an equivalent conversion to multi-page TIFF and splitting that works fine so it looks like it is just a MNG split problem.
Anyone got any solutions? I found a couple of other MNG splitting tools but they fail with error messages or just don't produce any output at all.
Thanks,
Phil.
PNGs => MNG Good, MNG => PNGs Fails
-
- Posts: 7
- Joined: 2012-09-12T12:39:19-07:00
- Authentication code: 67789
-
- Posts: 7
- Joined: 2012-09-12T12:39:19-07:00
- Authentication code: 67789
Re: PNGs => MNG Good, MNG => PNGs Fails
People,
To qualify my own question - this problem only occurs on MNG files that were created WITHOUT the "delay" switch switch eg:
convert *png t.mng
instead of:
convert -delay 100 *png t.mng
Thanks,
Phil.
To qualify my own question - this problem only occurs on MNG files that were created WITHOUT the "delay" switch switch eg:
convert *png t.mng
instead of:
convert -delay 100 *png t.mng
Thanks,
Phil.
Re: PNGs => MNG Good, MNG => PNGs Fails
Thanks for your clarification. Indeed, decoding a MNG with no delay between layers into a single frame is the proper behavior according to the MNG spec.
-
- Posts: 7
- Joined: 2012-09-12T12:39:19-07:00
- Authentication code: 67789
Re: PNGs => MNG Good, MNG => PNGs Fails
glennrp,
I was wondering if that was the case . . so is there any way of extracting the individual PNGs somehow?
Thanks,
Phil.
I was wondering if that was the case . . so is there any way of extracting the individual PNGs somehow?
Thanks,
Phil.
Re: PNGs => MNG Good, MNG => PNGs Fails
I don't know but there might be. I will have a look. What happens if you dophilip_rhoades wrote:... is there any way of extracting the individual PNGs somehow?
Code: Select all
animate -delay 100 file.mng
Code: Select all
convert -delay 100 file.mng file%02d.png
chunks out of a MNG, and then simply "cat" each group of chunks from IHDR to IEND into a PNG.
-
- Posts: 7
- Joined: 2012-09-12T12:39:19-07:00
- Authentication code: 67789
Re: PNGs => MNG Good, MNG => PNGs Fails
glennrp,
No . . I still just get one image . .
I did try pngsplit ("pngcheck -x") but it produces no output . .
Thanks,
Phil.
No . . I still just get one image . .
I did try pngsplit ("pngcheck -x") but it produces no output . .
Thanks,
Phil.
-
- Posts: 7
- Joined: 2012-09-12T12:39:19-07:00
- Authentication code: 67789
Re: PNGs => MNG Good, MNG => PNGs Fails
glennrp,
I found a solution - if the delay was not included when creating the MNG, then this will extract the PNGs:
mplayer -ss 00:00:00 -frames 4 -vo png t.mng
- the PNG files produced are large but shrink when processed into a MNG again (with the delay switch this time).
Regards,
Phil.
I found a solution - if the delay was not included when creating the MNG, then this will extract the PNGs:
mplayer -ss 00:00:00 -frames 4 -vo png t.mng
- the PNG files produced are large but shrink when processed into a MNG again (with the delay switch this time).
Regards,
Phil.