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
2
u/SpittingBull Mar 08 '25
You need to elaborate a bit more what your actual problem is - best with a working example. I mean like at least what is the icon source (image type and dimensions) and which control will receive that image using which property and whicj dimensions.
I never had an issues with resizing icons properly - may it be in FXML, CSS or directly in code.