Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Can we get the supported image types in Java
Yes, we can get the supported image types with ImageIO class in Java. The following is an example to get supported image types in Java:
Example
package my;
import javax.imageio.ImageIO;
public class SwingDemo {
public static void main(String[] args) throws Exception {
String[] imgTypes = ImageIO.getReaderFileSuffixes();
System.out.print("Supported Image Types = ");
for (String type : imgTypes) {
System.out.print("\n" + type);
}
}
}
Output
Supported Image Types = jpg tif tiff bmp gif png wbmp jpeg
Advertisements
