Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Kurt Miller, posted on February 08, 2005

Image Description, by Kurt Miller

This is a screenshot of Image Chunks, a little utility I started about a week ago. The goal of the program is to create a general-purpose, standalone image layout tool for developers. The way it works is that you load up template images (as shown in the floating window toward the bottom right), define "chunks" of that image (using rectangles) which are added to your "palette" in the left-hand listview, and then you "paint" with those chunks. The important thing though is that what you're painting is not really to create an actual image-- but rather to create a layout.

So in my little example, you see I have a source image with a basic window template (programmer art, ahem.) I define the pieces, and can now "paint" any window size or variety I want using those pieces. When the project is saved, its only the layout that's saved-- meaning the size and placement of all those painted rectangle pieces (and of course the rectangle info for the chunks.) That data can later be turned into triangle/uv information for an in-game renderer, or whatever else the user may wish to do with it. That floating 'bottom left' piece in the picture is where the mouse cursor is currently hovering.

In addition, every chunk, and every painted rectangle has optional key/value data associated with it. So for instance a user could paint an empty rectangle and add type information, like to specify its the placement of a 'text box' region that his game engine would recognize and handle accordingly. So it can be used as a GUI resource editor of sorts.

Its not just for GUIs though. One of my goals has been to keep it very general purpose, so one could use it for anything from basic hi-res splash screens to 2D tile editing. Or anything else that may benefit from rectangle arrangement info.

The editor itself is pretty straight-forward. It has zooming, panning, grid snapping, and so on. The 2D rendering is mostly all GDI work. The list on the left is a standard ListView control that's owner-drawn.

There's still a number of fixes and features I need to add before releasing it (for free, hopefully in another week or two), such as the exporting (which will use XML), stretching of painted rectangles (to prevent wasted paint), auto-packing of small images into chunkified templates, and a few more UI tools, but its coming along. Any suggestions for improving it though would be appreciated.

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

February 08, 2005, 02:38 PM

That's exactly what I need for my new project. Very good work :)

Kurt Miller wrote: for instance a user could paint an empty rectangle and add type information, like to specify its the placement of a 'text box' region that his game engine would recognize and handle accordingly.

A good feature could be to include a dialog-box with the classical type informations (button, text-box, list). Obviously it can be done without this dialog-box but it's nothing to code it and it's very userfriendly =)

And when will you release it ?

Anthony Bowyer-Lowe

February 08, 2005, 05:35 PM

Hmmm - I've been meaning to code a little utility like this for ages.

Thanks, Kurt. ;)


February 09, 2005, 01:33 AM

Weird, i was thinking about a tool like that too. As the image chunk resembles my XTextureSection class.

Does it support tiling also? I didn't do that in my class, as tiling of an inside chunk of a texture can't be achieved easily.


February 09, 2005, 05:51 AM

It would also be great if you can position things on the rectangle. So it can really be used as a kind of gui editor. With options like: 'place object at 30% of the left side, and in the vertical middle of its parent'. Which would mean that if you'd scale the whole thing the layout keeps looking good.


February 09, 2005, 07:08 AM

Great work, Kurt, this will be very useful! It would be perfect if this can be used in some form as a GUI editor for Crazy Eddie's GUI system.


February 10, 2005, 12:58 PM

Nice, cant' wait for this to come out, will help my GUI development!

What URL should i watch for it's release?


February 10, 2005, 04:46 PM

i'd say you'd have to watch flipcode, as the one who posted is the flipcode admin

This thread contains 7 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.