how can I convert an image to grayscale without losing transparency?
问题 I am having problems converting a colored image with some transparent pixels to grayscale. I have searched and found related questions on this website but nothing I have been able to use to solve my problem. I have defined a method "convertType" as follows: /*------------------------------ attempts to convert the type of the image argument to the chosen type for example: BufferedImage newImage= ImageUtilities.convertType(oldImage, BufferedImage.TYPE_3BYTE_BGR); 11/28/2013 WARNING-it remains