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 / Image Enhance plugin

Author
Message
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 18th Feb 2004 11:51 Edited at: 18th Feb 2004 14:25
I´m working quite a couple of weeks on a plugin for DBPro to enhance the 2D Image system.

Currently there are about 45 new commands.
Quote: "BASIC IMAGE COMMANDS
lock image
Unlock Image
make image
Grab Image
Clone Image
Copy Image Rect
Clone Image Rect
Paste Image Image

DRAW COMMANDS
Image point
Image Line
Image Frame
Image Box
Image Circle
Image Ellipse
Image Ellipse Fill
Image Circle Fill
Image Text
Image Polygon
Image Fill (a Flood filler)
CLI

IMAGE MANIPULATION
Invert Image
Blend Image
Split Image
Link Image
Flip Image
Mirror Image
Scale Image
Rotate Image (WIP)
Grey Image
Blur Image (needs improvement)
Bright Image
ShearH Image (WIP)
ShearV Image (WIP)

ADDITIONAL COMMANDS
Set ForeGround Color
Set BackGround Color

EXPRESSIONS
Get BackGround Color
Get ForeGround Color
Get Image point
image width
image height
image depth
image internal width
image internal height
image pointer
Image pitch
is Image Locked"


It quite small (about 60k) and quite fast (inverting a 500x500 image takes about 23 ms on my AMD 2400+). It writes in most commands directly to the image memory. I plan to improve the performance with coding the pixel -loops in ASM (after the whole thing works )

I decided not to add to many "idiot-security" to keep the speed up. That means: When drawing for example a circle (ellipse, polygon) to an image and one pixel is drawn outside the image, the whole thing is not drawn (that improve the speed VERY much).

Basically it offers differnt things:
Basic option and expressions:
You can lock an image and return the pointer and other stats. With this you can manipulate the image data with peek and poke (will be added to the plugin).

Here is an example that show the basic "how to"





GALACTIC X - A very early demo is now available - comments very welcome - http://www.angelfire.com/droid/galacticx/
also my IDE - jaPROe and some snippets and tools
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 18th Feb 2004 11:53 Edited at: 18th Feb 2004 14:26
The next thing are some commands to draw to the image.
The drawing commands use the fore and background color. Most things can be drawn a line, dotted line, filled and dotted filled.






GALACTIC X - A very early demo is now available - comments very welcome - http://www.angelfire.com/droid/galacticx/
also my IDE - jaPROe and some snippets and tools
Philip 1337
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 18th Feb 2004 11:55
Looks like it will be good

Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 18th Feb 2004 12:04
Actually I have problems with my page (forgot the pw) so I cant upload a demo. (and as my page cannot link pics) there will be not screenies available.
If someone can host 2-3 pics I´ll send them and maybe he or she can link them to that topic.

For the image manipulation commands I´m working currently on a example. The plugin is nearly finished and I hope it can be released the next week. I´m not sure, but i think about charge some money for it. (I think about 11 Euro)

If someone has some suggestions for other / more commands, please mail me or drop some lines here.

Some ideas for further improvement are:
Add some filter like
- bilinear and/or bicubic filtering
- Color shifting
- contrast manipuilation
- amboss (relief) filter
- sharpening filter


The help files are nearly finished. AS far as I have access to my page, I upload them. This give a bit a better overview of the commands.
I´ll drop a line when I upoaded it...

GALACTIC X - A very early demo is now available - comments very welcome - http://www.angelfire.com/droid/galacticx/
also my IDE - jaPROe and some snippets and tools
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 18th Feb 2004 14:28
I found a way to show some screenies. These are my test screenies. So dont expect too much from it. Its just to show if and how the commands work.

GALACTIC X - A very early demo is now available - comments very welcome - http://www.angelfire.com/droid/galacticx/
also my IDE - jaPROe and some snippets and tools
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 23rd Feb 2004 10:08
So, nearly finished. I´ll polish it up this week and then release it. Hs any1 some suggestions to include?

GALACTIC X - A very early demo is now available - comments very welcome - http://www.angelfire.com/droid/galacticx/
also my IDE - jaPROe and some snippets and tools
D Man
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 23rd Feb 2004 21:59
That's going to be very useful!
No suggestions so far.

God is real, unless declared integer.
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 24th Feb 2004 10:55 Edited at: 24th Feb 2004 11:04
ok, here´s the last news. The plugin is finished, help and ini files, too. Working on a demo (and hope to find bugs while doing this). There are some new commands, so it will sum up to about 50. The dll size is about 75k.

I did some speed test (I was interested in it myself - to see if what I thought was right):
Some tasks will boost incredibly. (it ranges from 120% faster (blurring an image- blurring a bitmap) up to 1300% faster (displaying text on a sprite - writing on a bitmap, grab image).

The demo will have section with some speed tests. I think that is the main reason for this plugin - PURE SPEED. Most of the rest is just playing with possibilities (filter images for example). I think nice, but not essential.

GALACTIC X - A very early demo is now available - comments very welcome - http://www.angelfire.com/droid/galacticx/
also my IDE - jaPROe and some snippets and tools
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 25th Feb 2004 21:43
Looks very good dostej, can't wait for it

"They misunderestimated us" - George Bush
"The box said 'Requires Windows 95 or better'. So I installed LINUX. "

Formerly David89.
Yian
21
Years of Service
User Offline
Joined: 16th Jun 2003
Location: Nicosia, Cyprus(the Greek half)
Posted: 25th Feb 2004 21:49
Will this allow you to choose a different colour for each line of text,and is there a fade out effect included?
Looking good...

I gots to go.
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 26th Feb 2004 11:02 Edited at: 26th Feb 2004 11:05
@David T / JohnDarkeye
The demo / prog is out now.
See this thread for more:
http://darkmatter.thegamecreators.com/?m=forum_view&t=26671&b=5

@JohnDarkeye
if you mean:
line 1 (in red)
Line 2 (in green) then, yes thats possible

if you think of
line 1 (the first pixel row in red, the sec in green)
then.. hm depends. You can code that with the plugin
write a text to an image in white (or whatever)
scan each pixel row
if pixel is white
change it to th ecolor you wish
I think it could be done quite fast accessing the pixeldata per pointer.

What do u mean with fade out.
Fade out a text? Then No, but you can do it nearly the same as the above example.
Fading out an image? Yes - there is a 'bright image' command. With this you can change the brightness of an image from black to white (and you can change the color tone as well - means you can blueish, redish the image...)
I hope this is wanted to know.

To code or not to be...
GALACTIC X - A brief overview - http://www.angelfire.com/space2/galactix also my IDE: jaPROe - the Image Enhance plugin and some snippets and tools -
Yian
21
Years of Service
User Offline
Joined: 16th Jun 2003
Location: Nicosia, Cyprus(the Greek half)
Posted: 26th Feb 2004 15:02
Quote: "Fade out a text? Then No,"

Well,I think you should add it,because it would be very usefull and make games look more professional.

I gots to go.
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 26th Feb 2004 16:37
Hm, I think the plugin gives you all possibilities to do that.
You can render the text to animage and then fade the image. It´s fast enough to fade the text in "real time".
If I add a poss to fade text then it would be "all the same" or a big DLL with lots of variations. Both seems not so useful for me.
If you wish, I can code you an example how to fade text.

To code or not to be...
GALACTIC X - A brief overview - http://www.angelfire.com/space2/galactix also my IDE: jaPROe - the Image Enhance plugin and some snippets and tools -
Yian
21
Years of Service
User Offline
Joined: 16th Jun 2003
Location: Nicosia, Cyprus(the Greek half)
Posted: 26th Feb 2004 21:36
Well,does your dll allow for example fade out of text in front of a 3D scene,with things going on?I don't think so,since you can only do that if the scene is stationary and so may be considered a 2D image..

I gots to go.
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 27th Feb 2004 09:29
@JohnDarkeye- yep, thats right. You can paste the text on an image or as a sprite with transparent background to the screen and then fade it out...

To code or not to be...
GALACTIC X - A brief overview - http://www.angelfire.com/space2/galactix also my IDE: jaPROe - the Image Enhance plugin and some snippets and tools -

Login to post a reply

Server time is: 2024-06-17 19:43:11
Your offset time is: 2024-06-17 19:43:11