Open macrael opened 8 years ago
I got same error when using P3D mode. In that case, I solved the issue by
this.loadPixels();
gifExport.addFrame(this.pixels, width, height);
instead of gifExport.addFrame();
(where this
implies any PApplet
).
@jeremydouglass and @macrael can you confirm this is resolved in the new 3.0 default branch? The library will be served at
@extrapixel I've installed the 3.0 library from the zip link above and tested both example gifDisplay and gifExport on Processing 3.4 and 3.5.4 -- both examples ran and displayed / saved correctly in both Processing versions.
I don't have Processing 4 on this machine -- maybe somebody else could give that a quick check?
Quick notes:
gifAnimation.txt lists minrevision = 0246 -- that's Processing 3.0. That seems reasonable, I'll just note that I didn't actually test on 3.0, only 3.4 and 3.5.4.
I believe that the old 2.0 library directory was GifAnimation and the new one is gifAnimation. Not necessarily an issue, just noting the change.
These "raw" urls may be submitted directly to the Processing librarian for listing in Contributions manager. However, if they are uploaded as attachments to a github 3.0 release on this repo, then the urls will be:
https://github.com/extrapixel/gif-animation/releases/latest/download/gifAnimation.txt https://github.com/extrapixel/gif-animation/releases/latest/download/gifAnimation.zip
...which is useful, because if is later a 3.1 release or 3.2 release et cetera, that new release and its attachments will automatically become the new "latest" urls on github, and then those urls don't need to be resubmitted to contributions manager and go through a potentially multi-day update and sync process.
thanks @jeremydouglass !
I think this issue can be closed.
Regarding your other notes - they all are valid points.
The 3.0 branch of processing does not work. I'm running processing 3.0.2 and even the included example gifExport fails in this way.
Exception in thread "Thread-2" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0 at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1016) at java.awt.image.BufferedImage.(BufferedImage.java:333)
at gifAnimation.GifMaker.addFrame(GifMaker.java:153)
at gifAnimation.GifMaker.addFrame(GifMaker.java:145)
at gifExport.draw(gifExport.java:54)
at processing.core.PApplet.handleDraw(PApplet.java:2402)
at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:859)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)