Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit fixes the weird blurry textures for player heads, as seen in #48
To fix the blurry images, we first need to set the requested width / height in the image constructor and also set the smoot parameter to false, which can only be set, when using the constructor.
As we just want a small part of the image (only the head), we need to scale the whole image by 16x, so that we can later extract the head with a resolution of 128 pixels, that will be scaled correctly (pixel-perfect, without smoothing).
The scaling without smoothing, seems to only work this way, as the "smooth" parameter cannot be set/changed when using another constructor/later.
Another option would be sampling the image with the PixelReader and creating a new Image with the PixelWriter by hand.
More information can be found here: https://stackoverflow.com/a/16092631