From 3d6820eb37d7bcc7490790105186081c9d39ec89 Mon Sep 17 00:00:00 2001 From: Chien Yang Date: Tue, 3 Oct 2006 05:05:10 +0000 Subject: Fix to Issue 295 : Texture3D throws ArrayIndexOutOfBoundsException when scaleImage git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@706 ba19aa83-45c5-6ac9-afd3-db810772062c --- src/classes/share/javax/media/j3d/ImageComponent3DRetained.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java b/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java index 91947bb..468536c 100644 --- a/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java +++ b/src/classes/share/javax/media/j3d/ImageComponent3DRetained.java @@ -387,10 +387,12 @@ class ImageComponent3DRetained extends ImageComponentRetained { ImageComponent3DRetained newImage = new ImageComponent3DRetained(); newImage.processParams(getFormat(), newWidth, newHeight, depth); + newImage.setImageFormatType(getImageFormatType()); + newImage.setUnitsPerPixel(getUnitsPerPixel()); newImage.imageData = newImage.createRenderedImageDataObject(null); for (int i = 0; i < depth; i++) { - newImage.scaleImage(xScale, yScale, depth, this); + newImage.scaleImage(xScale, yScale, i, this); } return newImage; -- cgit v1.2.3