|
@@ -79,7 +79,7 @@ public class TextureBlenderAWT extends AbstractTextureBlender {
|
|
for (int dataLayerIndex = 0; dataLayerIndex < depth; ++dataLayerIndex) {
|
|
for (int dataLayerIndex = 0; dataLayerIndex < depth; ++dataLayerIndex) {
|
|
ByteBuffer data = image.getData(dataLayerIndex);
|
|
ByteBuffer data = image.getData(dataLayerIndex);
|
|
data.rewind();
|
|
data.rewind();
|
|
- ByteBuffer newData = BufferUtils.createByteBuffer(width * height * 4);
|
|
|
|
|
|
+ ByteBuffer newData = BufferUtils.createByteBuffer(data.limit());
|
|
|
|
|
|
int dataIndex = 0, x = 0, y = 0, index = 0;
|
|
int dataIndex = 0, x = 0, y = 0, index = 0;
|
|
while (index < data.limit()) {
|
|
while (index < data.limit()) {
|