I have Java Swing application with maximized bounds for JFrame
. The application is distributed as jar file up to now.
Initially for background image I have used some large arbitrary image file of png
-format. And I do have a code which can load and set image as background for JFrame
.
Now, I got a new image from designer in both cdr
and png
format. Png image is 5 by 4 thousand pixels now.
My requirements:
- to minimize image file size
- to support different screen resolutions
What would be the best option to meet requirements?
- Resize file to 1920x1080 and keep as
png
, and resize at runtime to smaller images if needed according to resolution - Keep file as
cdr
or some other vector format. But I am not sure Java can easily read and convert it toBufferedImage