imagej / ImageJ

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

Improved the ScreenGrabber class. Minor fixes to avoid some warnings. #190

Closed Bio7 closed 1 year ago

Bio7 commented 1 year ago

Improved the ScreenGrabber class to capture HighResolution images on HighDPI displays (tested on a MacOSX Retina display). Just minor fixes for warnings.

ctrueden commented 1 year ago

@Bio7 Awesome! I did not know about java.awt.image.MultiResolutionImage; that's a nice feature of AWT. Unfortunately, it would bump the minimum version of Java for ImageJ up to Java 9, since that's when it was added.

@rasband What do you think? I know we've been keeping ImageJ Java-6-compatible so that we can avoid the VerifyError issue with ImageJ2 (imagej/ij1-patcher#53), but setting ImageJ2 aside, what would be your preferred base version of Java to use with ImageJ these days? If you would otherwise want to upgrade to, say, Java 11, then I would prioritize making ImageJ2 work with an ij.jar compiled against that version of Java, because I would love to see ImageJ be able to take advantage of newer features like this multi-resolution support.

rasband commented 1 year ago

These minor fixes are in the ImageJ 1.54a18 daily build. The commit is at https://github.com/imagej/ImageJ/commit/d126abab66ff67309b7f63b5c2eeb59d6eefe063.

I did not include the Improved ScreenGrabber since it requires Java 9 and ImageJ currently targets Java 6. There is a plugin version at https://wsr.imagej.net/plugins/Screen_Grabber.java.

@ctrueden, it would be great if ImageJ2/Fiji would work with an ij.jar compiled for Java 11.