diff --git a/android/core/src/processing/core/PImage.java b/android/core/src/processing/core/PImage.java index 791071742..91283e6ed 100644 --- a/android/core/src/processing/core/PImage.java +++ b/android/core/src/processing/core/PImage.java @@ -1486,8 +1486,8 @@ public class PImage implements PConstants, Cloneable { int mode) { if (srcX1 < 0) srcX1 = 0; if (srcY1 < 0) srcY1 = 0; - if (srcX2 >= img.width) srcX2 = img.width - 1; - if (srcY2 >= img.height) srcY2 = img.height - 1; + if (srcX2 > img.width) srcX2 = img.width; + if (srcY2 > img.height) srcY2 = img.height; int srcW = srcX2 - srcX1; int srcH = srcY2 - srcY1; diff --git a/core/src/processing/core/PImage.java b/core/src/processing/core/PImage.java index c9fa24780..d888e60e8 100644 --- a/core/src/processing/core/PImage.java +++ b/core/src/processing/core/PImage.java @@ -1565,8 +1565,8 @@ public class PImage implements PConstants, Cloneable { int mode) { if (srcX1 < 0) srcX1 = 0; if (srcY1 < 0) srcY1 = 0; - if (srcX2 >= img.width) srcX2 = img.width - 1; - if (srcY2 >= img.height) srcY2 = img.height - 1; + if (srcX2 > img.width) srcX2 = img.width; + if (srcY2 > img.height) srcY2 = img.height; int srcW = srcX2 - srcX1; int srcH = srcY2 - srcY1; diff --git a/core/todo.txt b/core/todo.txt index c0f111e86..1fc4c2c10 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -2,8 +2,8 @@ X fix problem with textMode(SHAPE) when using createFont() X fix other problems with font use in PDF X remove debug message from PDF -X consider adding skewX/Y -o do them as shearX/Y +X add skewX/skewY +o do them as shearX/Y? X http://dev.processing.org/bugs/show_bug.cgi?id=1448