I am very new to image processing. I have a PNG image (using ImageIO.read() ) that gives BufferedImage.TYPE_CUSTOM when I call getType() on it.
BufferedImage bi = ImageIO.read(new URL("file:/C:/samp1.png")); int type =bi.getType();
Now I would like to convert it to one of the following models:
- TYPE_USHORT_GRAY
- TYPE_3BYTE_BGR
- TYPE_BYTE_GRAY
- TYPE_INT_RGB
- TYPE_INT_ARGB
The above should be performed for further image processing using a library that recognizes only the above types.
How can I convert from TYPE_CUSTOM color model to other models?
Any hints / pointers would be much appreciated. If there is no existing library for this, any link / message for steps / algorithm will be great.
source share