I have a PHP script that I need fixed or a new one written. The script splits an animated PNG image (APNG) into frames and saves them as static images. The problem is that the created files are not valid PNG images. Sometimes only first frame. In some cases the resulting images are shown fine in Adobe Photoshop and in Microsoft Image Viewer, but are not valid for Firefox browser and/or PHP GD library.
So I need this script to split the animated PNG into valid images (separate frames) that are
- valid for PHP GD library. The images should be valid for the imagecreatefrompng() function in PHP and must be correctly readable. All transparency and other features must remain in the generated images
- valid for Adobe Photoshop (CS5), Mozilla Firefox, Google Chrome and Opera.
- valid for Microsoft Image Viewer
In other words the animation must be split into valid PNG images. I have attached the samples of animated PNG images for you to try on. The script is attached too.
I have a perfectly good working C++ application source along with the application (in the attachment). If anyone finds it easier to convert C++ to PHP, would be great too.
P.S. In order to test the C++ application, simply drag and drop an animated PNG file on the exe file
I'm just started to use my [login to view URL] account, so I look like a beginnen but I got over 10 years of professional php experience. If you have any questions, just send them to me.