I’m trying to recolour images and have run into a slight problem.
colourImage holds a block of the relevant colour and greyImage holds a greyscale image. The following two lines are supposed to put the greyscale image into colourImage’s alpha raster. It is then drawn onto a destination image.
WritableRaster wr = colourImage.getAlphaRaster();
wr.setRect(shadeImage.getData());
width and height are ints containing the width and height of the image.
The problem is, it seems to be scaling the shadeImage horizontally to several times its original width when it does so.
Anyone have any idea why?