Skip to content

get() and get(x, y, w, h) don't work in android mode #154

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

Closed
eddie-melcer opened this issue Oct 11, 2015 · 1 comment
Closed

get() and get(x, y, w, h) don't work in android mode #154

eddie-melcer opened this issue Oct 11, 2015 · 1 comment

Comments

@eddie-melcer
Copy link

get(x,y) works in android mode, but get() and get(x, y, w, h) don't.

EXAMPLES:
void setup(){ }

void draw(){
PImage test = get(0, 0, 1, 1);
}

AND

void setup(){ }

void draw(){
PImage test = get();
}

OUTPUT:
FATAL EXCEPTION: Animation Thread
Process: processing.test.gettest, PID: 27405
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Bitmap.getPixels(int[], int, int, int, int, int, int)' on a null object reference
at processing.core.PImage.getImpl(Unknown Source)
at processing.core.PImage.get(Unknown Source)
at processing.core.PApplet.get(Unknown Source)
at processing.test.gettest.GetTest.draw(GetTest.java:25)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PGraphicsAndroid2D.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:818)

@codeanticode
Copy link
Contributor

Fixed with 907a9f1

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

2 participants