Skip to content

Support for loading Minecraft map files (.dat) / Plugin review #9929

Description

@cmbruns

What did you do?

I wrote a pillow plugin for loading Minecraft map info files as Images.

What did you expect to happen?

Minecraft map info images should look correct when loaded then saved as other formats.

What actually happened?

They do look good. Yay!

What are your OS, Python and Pillow versions?

  • OS: Windows 10
  • Python: 3.14
  • Pillow: 12.3.0

Hi Pillow Maintainers,

I created a Pillow image plugin wrapper for loading Minecraft Java Edition map item files (.dat).

Minecraft maps are compressed using GZIP and contain a NBT structural payload housing a raw 128x128 8-bit color-indexed array (colors), alongside positioning scalar values (xCenter, zCenter, scale, and a DataVersion timeline integer).

I've published the code as an independent package here:
https://github.com/cmbruns/pillow-minecraft-map

I would appreciate any informal feedback or code review on whether my implementation aligns cleanly with Pillow's architectural conventions (specifically around load() and self.im.putpalette syncing).

The main meat of the plugin is in https://github.com/cmbruns/pillow-minecraft-map/blob/main/src/pillow_minecraft_map/plugin.py

Thank you so much for your time and for maintaining such an incredible library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions