MS Paint / Photoshop clone: GDI?

Started by
6 comments, last by Evil Steve 17 years, 11 months ago
I've recently been doing a lot of pixel art, and I decided that I'd like to create my own paint package. I'm aiming for some thing almost identical to MS Paint, but with support for more tools, and with a few minor changes. I'd like to use alpha, and to be able to adjust the images RGB values, and I was wondering of GDI would be too slow? Also, what's the support for alpha like? It's been ages since I used it... I looked into using SDL, but I found it a bit too limiting (I want menus, dialogs, etc). I was also thinking of using D3D, but I figured that'd probably be overkill. If I was using D3D, I'd split the image into several 256x256 texture chunks, and render them as 2D quads on the screen. So, any suggestions?
Advertisement
Look into DIBSections, i've made my own paint programm as well. I'm using plain GDI and MFC. The only thing that may get slow is zooming with crap hardware like the Intel Graphics for example.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

How are they performance-wise with alpha? For example masking, and layering a few things on top of each other (Like photoshop layers, but not as advanced)?
I'm not sure if this is applicable but did you check out Paint.NET which is also open source?
If your tool is a graphic editor you can easily get away with using Java for it (even though I know with proper coding you can create a major graphic editor).

You have Java's UI toolkit at your disposal, which is easy to use even if somewhat slower than native controls. If used by someone who knows what he's doing, the differences are much smaller than people even know.

In addition you can enjoy Java2D's entire feature set which gives you everything you ever needed in terms of coloring, surfaces, etc. Of course, another main benefit is built-in hardware acceleration with just a few JVM switches.


You can create a tool with a relatively small development process like this and it's really viable.
-----------------------------He moves in space with minimum waste and maximum joyGalactic Conflict demo reel -http://www.youtube.com/watch?v=hh8z5jdpfXY
Quote:Original post by Evil Steve
I'm aiming for some thing almost identical to MS Paint, but with support for more tools, and with a few minor changes.

I think that was pretty much the mission statement of the Paint.NET guys, who are using GDI+.

--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Support for alpha is GDI is rudimentary at best. Basically DIB's can have RBGA information providing 8 bits of alpha and you have the AlphaBlend API and that's pretty much it. Various GDI calls also have a nasty habit of destrying alpha information even when it seems that GDI must have gone out of it's way to do so.

GDI+ has much better support.

I have no idea of the relative perf of either.
-Mike
I had a look at Paint.NET, and it's similar to what I'm looking for. Not quite right, but similar. There's a few things that erk me about it.

I think I'll have a look at making my own application with GDI+.

Thanks for all the replies.

This topic is closed to new replies.

Advertisement