Sign in to follow this  
Evil Steve

MS Paint / Photoshop clone: GDI?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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+.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this