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

Feature Request: Printing images to maps #18

Open
Techokami opened this issue Oct 27, 2014 · 3 comments
Open

Feature Request: Printing images to maps #18

Techokami opened this issue Oct 27, 2014 · 3 comments

Comments

@Techokami
Copy link

Quite simply, having a means of taking a blank map, sticking it into the paper tray of a printer, and using a computer to print a 128x128 pixel-sized color image to said blank map would be amazing. We can then hang the picture on a wall with an Item Frame! This is something the original printer mod for ComputerCraft did, before dan200 added official printers.

@CaitlynMainer
Copy link
Member

Sure, PR that and I'd love to add it. :p
Really though I've wanted to do this, I just have no idea where to start..

@Techokami
Copy link
Author

I got no idea where to start, either, hence why I put this here XD

@AfterLifeLochie
Copy link

As far as I'm aware with this, you have to give the player a filled_map item with a map ID. In the world's data directory you'll have to check the idcounts.dat for the next map unique number. idcounts.dat is an uncompressed NBT file which only contains a map tag which has the latest Map ID.

The map_[id].dat format is relatively simple and is a compressed NBT blob. It contains a data tag which has the scale, the dimension the map belongs to, the width and height, the x and z centre coordinates and the color array which represents the actual pixels (ie, 16384 if it's a 128x128 map).

It's also worth noting that, as far as I'm aware, the color data array isn't an rgb(a) array, it's actually a custom color palette with a set of limited colors, so you'll either have to shed image quality or limit the colors which can be printed in the first place.

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

No branches or pull requests

3 participants