imagej / ImageJ

Public domain software for processing and analyzing scientific images
http://imagej.org
Other
577 stars 227 forks source link

ImageConverter.convertToGray8 fall into java.awt.HeadlessException: null #261

Closed dodokpeter closed 1 month ago

dodokpeter commented 1 month ago

Hi I am using ImageJ for processing image in spring boot app. After calling ImageConverter.convertToGray8 it will hit Headless exception. As I intended to use this library with in rest api, there is no win feature. Here is the stack: java.awt.HeadlessException: null at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:166) at java.desktop/java.awt.TextComponent.(TextComponent.java:150) at java.desktop/java.awt.TextArea.(TextArea.java:261) at java.desktop/java.awt.TextArea.(TextArea.java:165) at ij.plugin.frame.Recorder.(Recorder.java:33) at ij.ImagePlus.getProcessor(ImagePlus.java:986) at ij.process.ImageConverter.convertToGray8(ImageConverter.java:29)

MatusJ commented 1 month ago

I experience the same issue.

rasband commented 1 month ago

This bug is fixed in the latest ImageJ daily build (1.54m12). The commit is at https://github.com/imagej/ImageJ/commit/6542086be946883919724c6f57dab70dcdb68806.

dodokpeter commented 1 month ago

thank you very much