views:

278

answers:

4

I need a tile/sprite editor kind of like Pixen, but I couldn't find one for Windows so I thought it might be a good exercise for me to try and put one together. I use Python, so are there any libraries out there that are suited to the task of putting together a simple tile/sprite editor?

+3  A: 

Have you looked at the Python Imaging Library (PIL)?

Amit
I have, but I don't know how to use them together :-/.
cornjuliox
+2  A: 

You just need a gui toolkit (gtk, qt, wx) a image library (PIL) and 500 hours of free time ...

THC4k
A: 

You could try PyGame but, seriously, you couldn't find a freeware graphics editor for Windows??!!

EDIT: In the past I've used Aha-Soft's IconXP for pixel work, but it costs USD 30 and doesn't offer all of the Pixen features that I guess you'll want.

Trevor Tippins
No, I couldn't find a freeware graphics editor suited to making tiles/sprites for Windows, and by that I meant one that had features like that of Pixen's.
cornjuliox
A: 

So, the fact is that creating a complex app with a nice UI takes time - I am just expanding a little bit on the answer by THC4k.

PIL, at least PIL alone is useless for this: it does have some functions to manipulate images, but the complicate task here is creating and tunning your desired UI.

That's where the widgets toolkits come in: You would have to pick a toolkit platform that can offer you buttons, images, load and save the image files, maybe some specialzed widgets you can use to create your color swatches, etc... both GTK+ and QT4.5 have a liberal license, are very complete, and ...very unpythonic on their use :-(

(While you are at it, whem using thse libraris and toolits our app can easily be multiplatform: you don't have to make it windows specific, it is equaly easy to create an app that will run on Windows, Linux and Mac using python and either GTK+ or Qt4)

One thing I Would suggest is for you to learn to proper use GIMP: it is an Image editor, and certainly it will lack a lot of tools you are needing for sprites: but you can expand it's capabilities with Python plug-ins. On the other hand GIMP does have thousands of features that you'd no longer will need to create for your stand-alone app. (think on layer support, color filters, image rotation, etc...)

Check around on how to install GIMP with Python support on Windows, then spend some hours learning the app, with some book-like text around preferably so you can find the hidden features.

Ah, ok, finally: If you want a very simple thing, just for the taste of "i did it" - you can use Pygame: You have to do all the drawing on the window, including text - but have straighter access to pixels, colors, mouse clicks and coordinates than with GTK+ or Qt, in a sense it would be a lot less of overhead for you to learn in terms of API's and internal working.

jsbueno
GIMP is awful. As someone once said on here, it's like Photoshop exploded and the result was GIMP. For UI advice, do the complete opposite of that awful piece of software. Paint.NET is a far superior choice.
Finglas
@Dockers: which part of "learn to use it" in my answer did you miss? And its open nature allows it to be expanded with other needed features for sprite/pixel editing.
jsbueno