What are the supported types for JPG and PNG in ImageJ2?

1 week ago 6
ARTICLE AD BOX

First off, I just want to scale and blur an image using Java. I don't want to implement it myself (i.e. copy from the Internet), but instead use a maintained library for that. So I found ImageJ2. This is my code:

public void blur(String unblurredPath, String blurredPath) { var img = (Img<Type>) new ImgOpener().openImgs(unblurredPath, new Type()).getFirst(); Gauss.inFloat(50d, img); IO.save(blurredPath, img); }

where Type is to be replaced with the correct class I'm looking for.

This is the test image I want to change:

a beach

I keep getting errors after guessing the correct type every time:

io.scif.FormatException: SCIFIO exception when writing to file FileLocation:file:/C:/Users/flyhi/IdeaProjects/cu2/target/test-classes/beach_blurred_new.png:

Pixeltype int8 is not supported by this format!

Then what is supported??

Read Entire Article