sdlink icon indicating copy to clipboard operation
sdlink copied to clipboard

[Feature]: Image Relay to Minecraft

Open hypherionmc opened this issue 1 month ago • 1 comments

🚀 Description

This is a feature I've been wanting to add for ages (since version 2).

The problem is finding a reliable way of doing so. There are a couple of mods out there that can show images in chat, but they usually don't have an API, are slow to update or has a bunch of compat issues.

There is no eta or deadline for this, but something I want to remind myself of.

One possible solution might be to use a custom tooltip renderer, so that the image is displayed when you hover over it

💡 Use Case

No response

hypherionmc avatar Nov 07 '25 18:11 hypherionmc

Hi, I propose a new method:

  • Show a clickable text component on messages with attachments, when clicked, it would run a command
  • The command will replace the current hotbar slot of the player with a ghost map item which would have a low quality (128x128) image "preview" on it
  • Since the item is a ghost item (either sent to the client with a packet or a different method) if the player changes their active hotbar slot or left/right clicks their real item would get updated and the held ghost map item would be replaced with the real item

Converting images to minecraft map data format has been done numerous times before so finding (or making our own) implementation shouldn't be too hard.

Also funny ffmpeg command that does it: ffmpeg -i - -i palette.bmp -filter_complex "[0:v]scale=128:128:flags=lanczos[scaled];[scaled][1:v]paletteuse=dither=none[output]" -map "[output]" -pix_fmt pal8 -f rawvideo -

deniz-blue avatar Nov 23 '25 11:11 deniz-blue