-2

I'm trying to convert a ".jpg" file to ".pbm" in java, but I've not been lucky, I tried with the following code: javaxt.io.Image image = new javaxt.io.Image("image.jpg"); image.saveAs("imagepbm.pbm"); But it didn't work, Could someone help me please! Thanks in advance!

KEVINPERCY
  • 31
  • 5

1 Answers1

0

In standard Java 8 PBM format is not supported. The list of supported formats as returned by

    String[] f2 = ImageIO.getWriterFormatNames();
    Arrays.stream(f2).forEach(t -> System.out.println(t));

is:

JPG
jpg
bmp
BMP
gif
GIF
WBMP
png
PNG
wbmp
jpeg
JPEG
Jim Garrison
  • 85,615
  • 20
  • 155
  • 190