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

[Bug]: Blurry button iconography. #733

Open
RokeJulianLockhart opened this issue Jun 22, 2024 · 8 comments
Open

[Bug]: Blurry button iconography. #733

RokeJulianLockhart opened this issue Jun 22, 2024 · 8 comments

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Jun 22, 2024

What happened?

Almost all button icons - except, sometimes, at some resolutions, the creeper and villager - are blurred:

Screenshot_20240622_195735

I'm actually quite surprised that they're interpolated, considering Minecraft's pixellated artstyle. Some lower-resolution icons would be much better if that can't be disabled.

Mod Loader

Forge from https://adfoc.us/serve/sitelinks/?id=271228&url=https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.2-43.4.0/forge-1.19.2-43.4.0-installer.jar

Screenshot_20240622_200110

Minecraft Version

1.19.2

Screenshot_20240622_200039

Version

5.9.8 from https://www.curseforge.com/minecraft/mc-mods/journeymap/files/5208387

Screenshot_20240622_200016

Relevant log output

  1. journeymap.log
  2. latest.log
@mysticdrew
Copy link
Member

Not really a bug, those images likely need sharper versions.

@mysticdrew
Copy link
Member

mysticdrew commented Jun 22, 2024

monsters

This is the raw image

@RokeJulianLockhart
Copy link
Author

#733 (comment)

@mysticdrew, unless you intend to replace them with vectors, or upload 8K rasters, there shall always be a display resolution in use which is higher than the versions contained in the .jar. As an example, most people thought 4K would last more than 4 years until its successor became used in a significant capacity, yet 8K displays amongst the middle and upper classes are weirdly prevalent (I'm still on 1440p, though).

Although vectors would fix this bug permanently, I expect that you don't want to replace the rendering engine used (or if it's not using anything custom, don't want to use a separate engine). However, if that's not used, then you have to disable interpolation somehow, which might be the same dilemma as aforementioned, based upon the versatility of the renderer in use.

The evident response to this absolute thesis on this feature would seem to be "Okay, then I'll just include 8K versions of the icons." However, that doesn't account for devices with memory restrictions, which is a significant amount of users. I can't imagine they want to unnecessarily downscale the icons when rendering the map... Am I missing something?

@mysticdrew
Copy link
Member

Minecraft does not provide a way to support rendering of vectors images, at least last I looked. That lwjgl lib was not in the class path.

Also, the image itself is scaled with stb_image to retain the quality as it's enlarged. But the images you are referring to have blurred edges in the raw image.

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Jun 22, 2024

#733 (comment)

@mysticdrew, ah, so the original images merely need to be re-exported without the Gaussian anti-aliasing (because I imagine you're implying that stb_image doesn't interpolate)?

@mysticdrew
Copy link
Member

Correct, but I don't have the original anymore.

STBImageResize.nstbir_resize_uint8_generic(
                from.pixels,
                from.getWidth(),
                from.getHeight(),
                0,
                scaledImage.pixels,
                scaledWidth,
                scaledHeight,
                0,
                from.format().components(),
                STBIR_ALPHA_CHANNEL_NONE,
                0,
                STBIR_EDGE_CLAMP,
                STBIR_FILTER_BOX,
                STBIR_COLORSPACE_LINEAR,
                0L);

This is stb image function we use for scaling the theme images

@RokeJulianLockhart

This comment was marked as off-topic.

@mysticdrew
Copy link
Member

mysticdrew commented Jun 24, 2024

You can swap the images your self here. minecraft/jourenymap/icon/theme/flat/icon

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants