support additional image types from ImageIO.read(), check alpha on unknown images (fixes #3442), other notes

This commit is contained in:
Ben Fry
2015-07-14 11:51:48 -04:00
parent 005bd4b7d9
commit 5e82cbe636
6 changed files with 57 additions and 14 deletions

View File

@@ -2903,6 +2903,9 @@ public class PGraphicsJava2D extends PGraphics {
if ((sourceX == 0) && (sourceY == 0) &&
(sourceWidth == sourceImage.width) &&
(sourceHeight == sourceImage.height)) {
// System.out.format("%d %d %dx%d %d%n", targetX, targetY,
// sourceImage.width, sourceImage.height,
// sourceImage.pixels.length);
raster.setDataElements(targetX, targetY,
sourceImage.width, sourceImage.height,
sourceImage.pixels);