Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Dark Imager - Bitmap Drawing Program

Author
Message
Glenn Carter
19
Years of Service
User Offline
Joined: 20th Mar 2005
Location: United Kingdom
Posted: 1st Oct 2007 22:09 Edited at: 1st Oct 2007 22:11
DarkImager is really just something I wanted to test the principle of, whether it is possible. Really, its intended to be a simple project intended to get me back into DBP programing.

It is a drawing program made using DBP. It is a work in progress, but I've so far got the load and save working, the main drawing and brush plugin system (Users can design their own brushes to use) and the fill. Next step, the shapes and then I'll work on a simple plugin system.

Ok, its never going to be a Photoshop, but it already beats paint, imho.

I'll update as soon as I have more info.



Glenn Carter
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 2nd Oct 2007 01:19
You know why it probably doesn't?

Paint has so many hidden features they dont talk about that are useful like...

recoloring
custom brushes
3 color at same time.
Perfect lines&squares.
huge brushes.
tiny brushes.
10x zoom.
http://gmc.yoyogames.com/lofiversion/index.php/t268154.html
Yeah, that link explains with detail...

Your signature has been deleted by a moderator because this joke is getting old.
tha_rami
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location: Netherlands
Posted: 2nd Oct 2007 03:43
You know why that's a useless comment, Aluseus? Because you've got absolutely no idea what his program can do.

Honestly Glenn, it looks clean and pretty. Keep it coming and we'll see soon enough if it outbeats Paint. Maybe use that link to improve your program .


A mod has been erased by your signature because it was larger than 600x120
Glenn Carter
19
Years of Service
User Offline
Joined: 20th Mar 2005
Location: United Kingdom
Posted: 2nd Oct 2007 12:40 Edited at: 2nd Oct 2007 12:42
Done quite a bit on it last night and today. Improved the Brush and Fill tools to make them more flexible.

Brush

The brush allows you to select multiple brushes to paint with. These brushes can be userdefined and are plugginable. The brush is basically a CSV file mapping the alpha of different points in a brush - giving a lot of power to define any brush you need.

I've now added a slider to set the opacity of the brush, giving you a lot more flexibility.

Fill

In this new screen I wanted to show the Fill functionality...



With the fill you can select tolerance for each channel (how tolerant the fill is of colours that are nearly the same but not quite the original colour). Tolerance ranges from 1 (not tolerant of subtle variations of colours to 255 which allows everything (meaning, if you've got all 3 channels for tolerance set to it - it will fill the whole screen)

And the Type of Fill: Normal, Lighten, Darken, Average - Normal is just a normal flood fill, Lighten lightens the fill area, Darken...er....darkens it., average - gets the average colour between the fill colour and the original colour, smooth - smooths out the colours with the fill area, gradiant - does a gradiant fill in the area, between the fill colour and the original colour.




In the screenshot...on the canvas are 4 filled drawings...top left is a normal fill with a very low tolerance - you can see how its left the fuzzy brush edges. Top Right is the same fill but with the tolerance reduced a little.
Bottom Right - has been darkened with a high tolerance (so it catches the different shades of colour in there) and bottom left has been left unfilled.


Anyway, I will post more info later.


@aluseus GOD: Not terribly helpful, I'm afraid. Tell you what. When I release a BETA to the community why don't you download it and compare, rather than judging by a screenshot.

Also the link didn't work for me.


@tha_rami: Thanks for the positive attitude and comments. Appreciated.

Glenn Carter
zzz
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: Sweden
Posted: 2nd Oct 2007 19:41
Wow, it looks really good!
Nice work on the fill tool.
Keep it up!

WII number: 8220 5043 6939 7393
Jrock
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Riven
Posted: 3rd Oct 2007 00:49 Edited at: 3rd Oct 2007 00:50
What zzz said. ^




Practice makes perfect. But if nobody is perfect, why practice?
Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 3rd Oct 2007 19:10
Nice, I'm curious as what you did for the flood tool. Is it a recursive method or what? I had tried to do one before and it was somewhat slow, but that wasn't in DarkBASIC.

-Jeff

Space Game WIP
Glenn Carter
19
Years of Service
User Offline
Joined: 20th Mar 2005
Location: United Kingdom
Posted: 5th Oct 2007 23:34 Edited at: 6th Oct 2007 21:33
Thanks for the comments, guys.

Floodfill:
I use a queue based system, I will post my code for it. I tried a typical flood fill recursize method and it was very fast, but kept causing stack overflows on larger areas (as least I think that was what it was doing - either way it was breaking DBP).

It is not brilliantly fast - its alright, but could be faster - but I think thats more to do with the point and dot commands, so I will try moving to a memblock based read and write of colour values and will see if that helps. I suppose all that business with locking pixels and so on might be better, but I have only just got back into DBP and haven't yet had the time to try and understand what on earth is happening with those methods.

Glenn Carter
Glenn Carter
19
Years of Service
User Offline
Joined: 20th Mar 2005
Location: United Kingdom
Posted: 6th Oct 2007 21:42
Ok, new additions...

Line Tool:

I decided that just drawing a straight line lacked enough flexibility - so I've done the line tool linked to the current brush.

So if you select a brush that is quite fuzzy - you get a fuzzy line....and so on...

You can also set the spacing used along the lines - so you can have a tight line, or a dotted line. The advantage of this is that, say you have a brush that is the shape of star - you could set it up to do a line of stars distanced a set distance away from each other.



The above image shows the line tool used with various brushes, opacity settings and spacings...

Plugins

Implemented a simple plugin system that allows you to make custom plugins to expand the functionality. Basically when you execute a plugin the program creates a temp export file (which is basically a memblock for the main window thats been saved). Then the plugin does its stuff and creates an import file with the same structure. The program picks it up and loads the revised image, then cleans up all the files. Simple, but works well. I've already made 2 plugins. One just makes the image negative (the results of which are pictured below) and the other allows you to set the RGB color values and tweak the colour of image.



Glenn Carter
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 6th Oct 2007 23:32
@Glenn Carter

Nvm I realize the point...

Not even a strait suit, you, caramel, the recycling bin, uber code, and chuck norris combined can keep me safe from me. Mostly cuz I exist.

Login to post a reply

Server time is: 2024-11-27 20:45:03
Your offset time is: 2024-11-27 20:45:03