人生最曼妙的风景,竟是内心的淡定与从容!
Maybe you need commons-imaging to help you.
ImageInfo imageInfo = Imaging.getImageInfo(file); imageInfo.getColorType();
============I downloaded an old version and tried RGB and CMYK====================
ImageInfo imageInfo = Sanselan.getImageInfo(new File("/*.jpg")); int type = imageInfo.getColorType(); if(ImageInfo.COLOR_TYPE_RGB == type){ System.out.println("RGB"); }else if(ImageInfo.COLOR_TYPE_CMYK == type){ System.out.println("CMYK"); }else{ System.out.println("other"); }
The result is correct, no more pictures have been tried to verify.
Maybe you need commons-imaging to help you.
============I downloaded an old version and tried RGB and CMYK====================
The result is correct, no more pictures have been tried to verify.