r/JavaFX • u/random-pc-user • Mar 08 '25
Help How do I stop images from being jagged when they're small?
In my JavaFX app small images always look extremely jagged unless I scale them down externally then upload them, but that just makes them extremely blurry, making me deal with either blurry images or jagged images.
First Icon is scaled down so it's blurry
Second Icon is normal and its not scaled down or up
Third Icon is normal but still looks jagged because its edges are diagonal

1
Upvotes
View all comments
Show parent comment
1
u/random-pc-user Mar 08 '25 edited Mar 08 '25
If I have an image that's 512 x 512 and I place it either in an image view element that's 30 x 30 or as a background of something like a pane then resize the pane to 30 x 30 I get the bottom most thing as a result.
If I scale it down externally I get the top most thing as a result.
I'm only saying this because I don't get the same results in HTML or CSS.
this post took a while to just upload for whatever reason, I found a small work around using the resize thing in Windows Pictures app but still a bit blurry