I wrote the below code to check if the type of the image "RGB,BGR or any other type". when i ran the code i received value equals to 5, and i also checked the docs here but still i do not know which type is equivalent to number 5!
please let me know how to know the equivalent image type to 5.
code:
public class MainClass {
public static void main(String[] args) throws IOException {
File imgFile = new File("c:\\img.jpg");
BufferedImage bi = ImageIO.read(imgFile);
System.out.println(bi.getType());
}
}
Reading the getType() documentation you provided led me to the image type listings in "See Also". That led to the Constant Field Values document. It would seem that 5 is equivalent to "TYPE_3BYTE_BGR".