1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-25 21:33:04 +04:00

10 Commits

Author SHA1 Message Date
ZIHAN DAI 1610602884 Merge pull request #28699 from PDGGK:fix/highgui-system-exit
Replace System.exit(-1) with exceptions in HighGui.java (#28696) #28699

## Summary

Library code should never call System.exit() as it kills the entire JVM. Replaced all 3 instances with appropriate exceptions.

Closes #28696

## Changes

- `imshow()` with empty image: `System.exit(-1)` -> `throw new IllegalArgumentException("Image is empty")`
- `waitKey()` with no windows: `System.exit(-1)` -> `throw new IllegalStateException("No windows created. Call imshow() first")`
- `waitKey()` with null window image: `System.exit(-1)` -> `throw new IllegalStateException("No image set for window: ... Call imshow() first")`
- `InterruptedException` catch: `printStackTrace()` -> `Thread.currentThread().interrupt()`
2026-03-23 16:20:50 +03:00
Corentin Noël da078c4b75 highgui: Make GThread mandatory with GTK
The GThread API is available since more than 11 years with GLib, it is now safe
to assume that it is always available.
2024-07-15 16:30:39 +02:00
sepperliu 45587f23db Update highgui+HighGui.java
toBufferedImage
Modifying the original array copying method here can double the speed.
2024-04-03 13:29:10 +03:00
Alexander Alekhin 327109f327 highgui: update backends handling, fix WITH_OPENGL=ON build 2021-06-07 11:28:05 +00:00
Alexander Alekhin fb9a00c36d highgui: cleanup and fixes 2021-05-31 17:03:53 +00:00
Alexander Alekhin 70f69cb265 highgui: backends and plugins 2021-05-24 16:12:02 +00:00
Alexander Alekhin 1237faef80 java: disable highgui wrapped code 2018-01-13 02:12:39 +00:00
Vitaly Tuzov 51cb56ef2c Implementation of bit-exact resize. Internal calls to linear resize updated to use bit-exact version. (#9468) 2017-12-13 15:00:38 +03:00
tribta 6512a4b7e3 OpenCV Java Highgui Class
The objective is to:

    *Reduce greatly the number of lines of code in the Java codes;
    *Make it easy for Java users to add a trackbar and show the results;
    *Get the code more similar between C++, Java and Python, making the tutorials more uniform.
2017-07-01 11:07:20 +01:00
abratchik 037d8fbdcd Refactor OpenCV Java Wrapping 2017-06-15 20:35:12 +04:00