ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 spEngine Comments and Question
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

w2m

USA
1990 Posts

Posted - Jan 13 2017 :  13:25:48  Show Profile  Reply
Rather than clogging up the user demo pages I offer some comment here:

The latest release OnMouseDown solid brush painting seems to work now. Good job!

One of the potential problems with your demo is that you used a number of Developers Express components, so a large number of potential users may not be able to compile the demo because they lack the Developers Express Library so I have converted your demo to only use standard VCL components. I love the Developers Express Library probably as much as you and generally prefer to use them in most cases over the standard VCL components but your general demo should not use them. Once my testing is complete I'll send you the slightly revised demo so you can include it in your distribution if you wish.

I only have two questions at the moment.

1. In my earlier testing I implemented Undo using the standard ImageEn undo methods. The IE proc undo methods seemed to operate correctly, but if the IE proc undo methods are used will that affect the spEngine in some way?

2. My earlier testing found that the solid brush does not seem to draw on the alpha channel. Is this true?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development

spetric

Croatia
308 Posts

Posted - Jan 13 2017 :  18:30:34  Show Profile  Reply
Hi Bill,

Good idea to open a new thread.

Yes, you're right about DevExpress components, my fault. DevExpress has a nice color combo box with color picker and it was the fastest way to implement color selections. I've put a source code mostly as information, as there is also an executable. It would be great to include your demo in distribution, thanks.

Regarding your questions:

1. You can do any kind of "undoing", as long as original TIEBitmap does not change it's address. You can have some external undo buffer and then draw from that buffer onto original TIEBitmap. After that speUpdateSurface must be called in order to synchronize internal maps.

The other way is to delete surface and create a new one.
In my prog. Pixopedia I use an undo buffer that stores only altered areas of image. When you draw a small stroke, it's a waste of memory and time to save complete image in some undo buffer. I'll probably implement internal undo when I grab some time.

2. I must check this. I ported code from Pixopedia and to be honest I didn't perform any test on images with alpha channel. I'll try it and correct an error ASAP.

Thanks a lot for your time
Siniša

BTW, I've made changes to brush common structure/record (not the ones used in demo so far) to implement a stroke envelope. The old version used so called fader parameters which did not produced desired results. Now you can specify an stroke envelope as simple string which may be repeated or not.
Here is an example of one repeated envelope:

The brush tip size changes according to given envelope: "10,100,40" means that at the begging of drawing, the brush size will be 10% of original size and then it goes up to 100% and down to 40%. The increment is specified by resolution parameter.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 14 2017 :  13:07:49  Show Profile  Reply
Please send me your email so I can send you the new vcl demo and a updated Developers Express demo. The VCL demo uses only standard vcl controls, and the Developers Express demo uses all Developers Express controls where possible.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Jan 16 2017 :  18:29:23  Show Profile  Reply
I forgot to put invert option and respective parameters under advanced brush parameters. It inverts brush intensity:


brushCommonParams.InvertOn; Boolean (false by default); 
brushCommonParams.InvertValue; Integer [1-255] (16 by default);

First parameter is usually associated to checkbox, while second one
is usually associated to track-bar (min = 1, max = 255).

Here are some strokes with inverted brush intensity:

brushCommonParams.InvertOn = true;
brushCommonParams.InvertValue = 44;
brushCommonParams.BlurOn = true;
brushCommonParams.BlurValue = 4;

Go to Top of Page

spetric

Croatia
308 Posts

Posted - Jan 21 2017 :  17:25:44  Show Profile  Reply
I have uploaded temporary 0.4 spEngine version:
http://www.sigmapi-design.com/archive/spEngine_temp.zip

It's still a "rough" Delphi demo with some new options: Invert option under Advanced tab and possibility to draw on images with alpha-channel.

Temporary version will be replaced with "official" version when I synchronize everything with Bill, as his Delphi demos are far more advanced then mine.

Siniša
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Jan 27 2017 :  18:57:56  Show Profile  Reply
Version 0.5 uploaded.
http://www.sigmapi-design.com/archive/spEngine.zip

-Some bugs corrected.
-New functions (APIs) for setting clone image and clone image position picking.
-Besides "original" demo and it's source code, a new demo source code written by Bill Miller added to zip file. New demo uses only standard VCLs.

Note: working with clone image (clone brush) is not implemented in demos. It will be implemented in next version.

Note: this is still "young" version of engine, so you may expect eventual crashes and some "misbehaving".

I have also rewritten an old plugin host library and created DLL using similar model as with drawing engine. It works with most Photoshop 8bf plug-in filters (32-bit mode only for now). I will upload version 0.1 as soon I write simple Delphi demo (using only standard VCLs).

With best regards,
Siniša

Go to Top of Page

spetric

Croatia
308 Posts

Posted - Nov 21 2017 :  16:26:49  Show Profile  Reply
Hi,

Last few weeks, I've been working on the new version of drawing engine.
So far, I've changed some structures and calling functions and removed some of them (now, when some brush parameters are changed, the change is immediately reflected to DLL, so there is no need for calling setBrushCommon function).

Besides drawing action with various modes (which was only one action available), now there is also color adjustment, pixels shifting with various pixel arithmetic modes, simple 3x3 filters. All of them can work through brush movements, strokes and shapes and of course on complete image or on some desired selection.

And finally, I have integrated Intel IPP library in my engine. It runs really fast. I have implemented a bunch of linear, nonlinear and morphological filters and all of them can be applied through brush strokes, selections and complete image as well.

Here is how current engine architecture looks like:



and here is an output of bilateral filter with some testing, preset sigmaV and sigmaS values:



So far, everything works fine and within a month or two I will convert header file to Delphi unit and upload the new version. This time it will be without C++ and Delphi demo, but it will not defer to much from previous demo versions.

IPP is free for non-commercial use, but I really would like to put somehow OpenCV under the hub of this engine (it has also some kind of handshaking with IPP).

I've downloaded a new prebuilt version for VC, hoping to create OMF libs but it contains only 64-bit DLLs and for now I'm interested in 32-bit library. If somebody knows where I can download 32-bit libraris (new version),
it would be nice.

Otherwise, I'll have to build OpenCV with few compilers and tool-chains I have and try to create static libraries in OMF/ELF format...but I'm not very optimistic. Creating static libs for IPP was not a problem (two bat files and that's it).

With best regards,
Siniša

Go to Top of Page

xequte

38182 Posts

Posted - Nov 21 2017 :  20:32:38  Show Profile  Reply
Hi Sinisa

This sounds like a good plan. I look forward to testing the new version.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Jul 07 2020 :  15:48:11  Show Profile  Reply
Hi,

I'm bumping this old topic, because complete engine's source code is available on GitHub:

https://github.com/spetric/SigmaPi-Engine.

This is the newest, up to date version, currently used as main drawing and image processing engine for my painter and image editor program.

There is no demo for new version, but depending on interest, I will eventually write Wiki pages with APIs description. Old version demo still exists.

With best regards,
Siniša
Go to Top of Page

xequte

38182 Posts

Posted - Jul 07 2020 :  21:24:44  Show Profile  Reply
Nice work, Siniša,

>90% of our users are Delphi, so hopefully someone will translate the headers for you.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: