Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

Bio7
Copy link

@Bio7 Bio7 commented Dec 17, 2022

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

  • Added close statements for the use of the ZipFile class.
  • Added two 'this' operator statements to avoid warnings.
  • Deleted some unused references.

Bio7 added 2 commits December 17, 2022 11:34
Added two 'this' operator statements to avoid warnings.
Deleted unused references.
@Bio7 Bio7 changed the title Minor fixes to avoid some warnings. Improved the ScreenGrabber class. Minor fixes to avoid some warnings. Dec 17, 2022
@ctrueden
Copy link
Member

@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
Copy link
Member

rasband commented Dec 17, 2022

These minor fixes are in the ImageJ 1.54a18 daily build. The commit is at d126aba.

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.

@rasband rasband closed this Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants