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

Processing 3 branch fails to export gifs "Width (0) and height (0) cannot be <=0" #13

Open
macrael opened this issue Apr 14, 2016 · 5 comments
Milestone

Comments

@macrael
Copy link

macrael commented Apr 14, 2016

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)

@ghost
Copy link

ghost commented May 18, 2017

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).

@extrapixel
Copy link
Owner

@jeremydouglass
Copy link

@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?

@jeremydouglass
Copy link

Quick notes:

  1. 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.

  2. 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.

  3. 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.

@extrapixel
Copy link
Owner

thanks @jeremydouglass !

I think this issue can be closed.

Regarding your other notes - they all are valid points.

  1. I agree, we should at least test the advertised minrevision or change it to something that we did test.
  2. Yes I think it was renamed in the PR Pack the current dev branch for advertising on the Processing IDE #21 but I'm not sure why. I assumed some new naming convention?
  3. For the time being, i have submitted the raw urls to the librarian. My goal is to finally get this back into the library manager in the hopes to get more activity to this repo. In the medium term i think the release / distribution process needs to be refined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants