|
|
@ -53,10 +53,8 @@ public class MipMapGenerator { |
|
|
|
buffer, |
|
|
|
buffer, |
|
|
|
inputImage.getColorSpace()); |
|
|
|
inputImage.getColorSpace()); |
|
|
|
|
|
|
|
|
|
|
|
// Perform scaling in linear colorspace for higher quality.
|
|
|
|
ImageRaster input = ImageRaster.create(inputImage, 0, 0, false); |
|
|
|
// However it requires a lot of pow() calls..
|
|
|
|
ImageRaster output = ImageRaster.create(outputImage, 0, 0, false); |
|
|
|
ImageRaster input = ImageRaster.create(inputImage, 0, 0, true); |
|
|
|
|
|
|
|
ImageRaster output = ImageRaster.create(outputImage, 0, 0, true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float xRatio = ((float)(input.getWidth() - 1)) / output.getWidth(); |
|
|
|
float xRatio = ((float)(input.getWidth() - 1)) / output.getWidth(); |
|
|
|
float yRatio = ((float)(input.getHeight() - 1)) / output.getHeight(); |
|
|
|
float yRatio = ((float)(input.getHeight() - 1)) / output.getHeight(); |
|
|
|