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

Using imagescarl throws error #133

Open
LuposX opened this issue Jul 7, 2021 · 1 comment
Open

Using imagescarl throws error #133

LuposX opened this issue Jul 7, 2021 · 1 comment

Comments

@LuposX
Copy link

LuposX commented Jul 7, 2021

I downloaded imagescalr and added it to the project.
When trying to rezise a image with Scalr.resize(this.chessImg, Scalr.Method.SPEED, Scalr.Mode.FIT_TO_WIDTH,

I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/imgscalr/Scalr$Method
	at main.ChessField.<init>(ChessField.java:26)
	at main.GameRenderAWT.<init>(GameRenderAWT.java:29)
	at main.Main.<init>(Main.java:21)
	at main.Main.main(Main.java:17)
Caused by: java.lang.ClassNotFoundException: org.imgscalr.Scalr$Method
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 4 more

I am sure that I have added th jar ro the project so i dont know why classes would be missing.

@cartesian-plane
Copy link

@LuposX
Hello, I have a question about the Chess game you made.

(I couldn't find any contact info so I am contacting you here)
How did you handle the scaling of the chesspiece icons, as I myself have tried multiple approaches but none were good enough (batik, imgscalr, svgsalamander). The icons are always a bit blurry even if I downscale from a 4k PNG.
Reading SVG's also seems to be a pain in Java.
If you could point me in the right direction, I'd really appreciate it!

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

No branches or pull requests

2 participants