diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 837e8e80d..51390be8d 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -6456,7 +6456,7 @@ public class PGraphicsOpenGL extends PGraphics { if (img.parent == null) { img.parent = parent; } - Texture tex = new Texture(this, img.width, img.height, params); + Texture tex = new Texture(this, img.pixelWidth, img.pixelHeight, params); setCache(img, tex); return tex; }