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

save() and saveFrame() with 2X renderers fails #3255

Closed
shiffman opened this Issue May 8, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@shiffman
Member

shiffman commented May 8, 2015

@benfry I'm not sure if I'm too early in the development process to report this. The following error occurs in JAVA2D_2X and P2D_2X with save() and saveFrame(). My desired behavior is to get a 2X PNG out for high-res screenshots.

Error while saving image.
java.io.IOException: image save failed.
    at processing.core.PImage.saveImageIO(PImage.java:3208)
    at processing.core.PImage.save(PImage.java:3341)
    at processing.core.PApplet.save(PApplet.java:3136)
    at exercise_7_10_spaceship.draw(exercise_7_10_spaceship.java:38)
    at processing.core.PApplet.handleDraw(PApplet.java:1858)
    at processing.core.PSurfaceAWT$14.render(PSurfaceAWT.java:1388)
    at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:246)
java.lang.ArrayIndexOutOfBoundsException: 230400
    at java.awt.image.BufferedImage.setRGB(BufferedImage.java:1059)
    at processing.core.PImage.saveImageIO(PImage.java:3162)
    at processing.core.PImage.save(PImage.java:3341)
    at processing.core.PApplet.save(PApplet.java:3136)
    at exercise_7_10_spaceship.draw(exercise_7_10_spaceship.java:38)
    at processing.core.PApplet.handleDraw(PApplet.java:1858)
    at processing.core.PSurfaceAWT$14.render(PSurfaceAWT.java:1388)
    at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:246)
@REAS

This comment has been minimized.

Show comment
Hide comment
@REAS

REAS May 8, 2015

Member

Saving screens with P2D and P3D also fails, but it doesn't throw an error. The files appear to be the correct size in KB but the OS and image applications can't recognize them.

Member

REAS commented May 8, 2015

Saving screens with P2D and P3D also fails, but it doesn't throw an error. The files appear to be the correct size in KB but the OS and image applications can't recognize them.

@REAS

This comment has been minimized.

Show comment
Hide comment
@REAS

REAS May 29, 2015

Member

JAVA2D_2X works for saving frames in 3.0a9, but not with all of the OpenGL renderers.

Member

REAS commented May 29, 2015

JAVA2D_2X works for saving frames in 3.0a9, but not with all of the OpenGL renderers.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jun 1, 2015

Member

@codeanticode is this the same as #3334?

Member

benfry commented Jun 1, 2015

@codeanticode is this the same as #3334?

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Jun 1, 2015

Member

It seems a different issue, with P2D/P3D the problem was that pixelWidth/pixelHeight were not initialized and stayed at 0 (irrespective of 2X). With JAVA2D, save() works, but don't have a retina machine to test JAVA2D_2X

Member

codeanticode commented Jun 1, 2015

It seems a different issue, with P2D/P3D the problem was that pixelWidth/pixelHeight were not initialized and stayed at 0 (irrespective of 2X). With JAVA2D, save() works, but don't have a retina machine to test JAVA2D_2X

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jun 1, 2015

Member

@codeanticode but it's working with P2D_2X and P3D_2X with that fix?

Member

benfry commented Jun 1, 2015

@codeanticode but it's working with P2D_2X and P3D_2X with that fix?

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Jun 1, 2015

Member

I cannot test 2X right now, but expect that the fix solves the issue on both retina and non-retina modes. I will just reopen it and test again tomorrow on retina.

Member

codeanticode commented Jun 1, 2015

I cannot test 2X right now, but expect that the fix solves the issue on both retina and non-retina modes. I will just reopen it and test again tomorrow on retina.

@benfry benfry added this to the 3.0 beta 1 milestone Jun 16, 2015

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Jun 16, 2015

Member

Working with the current version of the source.

Member

benfry commented Jun 16, 2015

Working with the current version of the source.

@benfry benfry closed this Jun 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment