BMP2POK graphics conversion tool


You might be surprised (or not) to learn, I’ll be using these gfx in hi-res mode. there does seem to be a speed issue with the sim though, not sure if it’s an issue with the sim, or the libraries but every few seconds it goes into turbo mode for half a second or so, not easy to work with. Might that have something to do with those optimizations you mentioned in the plasma post?


I’m working on something similar. We need to talk.

Edit: are you experiencing the “turbo mode” in linux or win?


windows, I’ll try to record it somehow…

The player logic check for direction keys only once per tile and as the tiles are vanishing as they should, then I presume that the game logic is working fine. (Plus it’s mostly copy+paste from my Arduboy version of this game).


Now with:

  • better palette extraction
  • split c code with tiles (row columns)
  • export palette as json (and load it back)
  • use image as palette.

todo: reorder palette from listbox, tooltips for helps, better code generation and some internal refactorization.


Last iteration: fix some wrong output and lot of small fixes.

4BS sprite/pallet converter for png, tga, bmp, psd

Is the reorder palette implemented? If not, can you let me know how img2pok generates the palette? By amount of color in the pic or the horizontal order from 0,0?


just drag and drop colors in the listbox.
The colors are generated by top avarage using “Extract to palette from image”, or using all colors with “Extract all colors”.


whats this using for ui? is it portable to mac/linux?


Hi @adekto, sorry for late response. I take some time to check it under Ubuntu. It’s .NET and plain WinForm so it should run even in Linux/Mac.

I take a clean machine with Ubuntu 17.04 moved the exe there then run in terminal

sudo apt-get install mono-runtime
sudo apt-get install libmono-system-windows-forms4.0-cil

now from console I run the img2pok.exe with mono:

mono yourpathto/img2exe

and it seems to work. But I’m not a Linux user. I have no way to test under Mac now, but it should be more or less the same.


Just fund a bug, the imported palette was not respected if using an external image as reference.
Also modify the exported c file if splitting the sprite sheet. In that case the output is an handy 2D array

Roguelike port?

Just re-read that post, something similar you say? Game-wise or real-colour-wise?


img2pok bump to 0.4

Transparent color mapped to first color in palette, better handling of mapping colors.
Json import export require external dll, so included here

also removed locking on original image, so you can edit it and reload without closing the software.


Could we please make this a part of the GitHub repo ? It could be a submodule included in the tools or its own repository


Time to polish! :grin:
Really it will be a honor! Probably I should clean the code and maybe optimize some routine.
My main concern is its written in C# (Win Form) so it will be like a white fly among all that C/C++ stuff :relaxed:

So yes. I think I’ll go for a public repo with my account, then we’ll see the best way to join up.

And here it’s a draft:


Forked! Thanks. Now available via Pokitto repo


Any chance someone can drop in an 8bit (256Color) option?


in 565 rgb? or you still want that in a pallet?


Something like this?

Please give a try


Yup, that should do it! Thanks.

Although it crashes if you try to change the number of columns with an 8bit palette.


Whops! Didn’t test that. I neither test the output with 8 bit mode… feedback please.