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
 User Demos and Apps
 New Topic  Reply to Topic
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 8

spetric

Croatia
308 Posts

Posted - Jan 12 2017 :  14:53:31  Show Profile  Reply
Hi Bill,

In demo program, in OnMouseDown event nothing is drawn, because both ellipse radius are 0:

PaintView.ObjLeft[_hobj] := X;
PaintView.ObjTop[_hobj] := Y;
PaintView.ObjWidth[_hobj] := 0;
PaintView.ObjHeight[_hobj] := 0;

OnMouseDown event is used to prepare ellipse for drawing and
temporary iekEllipse object is created.

In OnMouseMove event, you actually "stretch" the ellipse:

rect.left := MouseData.X_down;
rect.top  := MouseData.Y_down;
rect.right := MouseData.X_move_to;
rect.bottom := MouseData.Y_move_to;
rect.NormalizeRect;
PaintView.ObjLeft[_hobj] := rect.left;
PaintView.ObjTop[_hobj] := rect.top;
PaintView.ObjWidth[_hobj] := rect.Width;
PaintView.ObjHeight[_hobj] := rect.Height;

In OnMouseUp event iekEllipse object is removed and rendering is performed according to given parameters.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 12 2017 :  14:58:35  Show Profile  Reply
I am using a solid brush, not an object.

Shouldn't this draw?
if AShapeType = px_shpFreeHand then
    speHandMouseDown(Shift, X, Y) <<==== Draw

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 12 2017 :  15:38:29  Show Profile  Reply
Oh, I see...you are using "free hand" drawing, not en ellipse.

In OnMouseDown event, actually in speHandMouseDown(Shift, X, Y) API,
nothing is drawn, because internally "free hand" drawing calculates
points on the Bresenham's line and so I need two points
X_from,Y_from -> X_to, Y_to.

Furthermore, not all points on the line (X_from,Y_from, X_to, Y_to) are taken into the account, because it depends on the step set (default is 2).

Actual drawing with "free hand" option is performed in OnMouseMove event
(speHandMouseMove(Shift, X, Y) API).

BTW, clear button in demo program does not work correctly, I must correct this.

Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 12 2017 :  15:40:31  Show Profile  Reply
ok, thanks... but to be useful in many cases I think OnMouseDown with "freehand" drawing should somehow draw.

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 12 2017 :  16:02:27  Show Profile  Reply
Yes, you're right, it should draw a brush tip
at point (X,Y). I'll add an option for that in the next version,
something like DrawOnMouseDown := True/False; and then exclude
that point from line drawing in OnMouseMove event.

However, it will work only in slow rendering mode (because of filters).

While I was running demo program, I found a bug exactly in free hand drawing.
In on shape's MouseUp event it was written:

bool TGrapHand::MouseUp(TShiftState Shift, int X, int Y)
{
return TGrapBasic::MouseMove(Shift, X, Y);
// It should be MouseUp from the base class!!! 
}

And that's the reason why clear button did not work correctly, actually free hand drawing in MouseUp event did not clear mask under the bounding rectangle.
I'll upload corrected dlls tomorrow.

Go to Top of Page

w2m

USA
1990 Posts

Posted - Jan 12 2017 :  16:03:34  Show Profile  Reply
Thanks!

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 12 2017 :  17:22:51  Show Profile  Reply
Done.

http://www.sigmapi-design.com/archive/spEngine.zip

If RenderParams.DrawTipOnMouseDown := True; (as in new demo version) brush tip is drawn in onMouseDown (for free hand shape). It will work for all rendering modes.
I used a dirty trick and internally created a line (x,y -> x+1,y) and rendered only the first pixel.
Bug in speHandMouseUp API corrected.
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Jan 30 2017 :  18:22:38  Show Profile  Reply
I made a little dll (32-bit only) that can load and execute 8bf plug-ins:



The same model as with drawing engine, but much simpler. Only ten functions
and one typedef. I even wrote a Delphi demo and unbelievable, it works...well, for most filters (some newer ones tend to crash badly).

Here is the zip file:
http://www.sigmapi-design.com/archive/spHost.zip

Have fun,
Siniša



Go to Top of Page

xequte

6332 Posts

Posted - Feb 01 2017 :  01:43:35  Show Profile  Reply
Hi Sinisa

Thanks, it accesses some cool effects:



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

w2m

USA
1990 Posts

Posted - Mar 03 2017 :  14:57:12  Show Profile  Reply
Scanning And Handling Multiframe TIFF Images
By Bill Miller Adirondack Software & Graphics
Full Source Demo Project
Compiled with Delphi 10 Seattle
Price: FREE


This is a beta demo that handles scanning, processing and creating multiframe TIFF files.



You may download it here:

attach/w2m/201733145630_ScanAndSaveTIFF.zip
90.51 KB

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

xequte

6332 Posts

Posted - Mar 04 2017 :  19:52:43  Show Profile  Reply
Nice work, Bill. Lots of features!


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

w2m

USA
1990 Posts

Posted - Apr 20 2017 :  13:26:36  Show Profile  Reply
ImageEn 7.0 MultiFrame Editor Demo With Frames, Layers and Brush Paint With IEBitmap Canvas And Alpha Channel
By Bill Miller Adirondack Software & Graphics
Full Source Demo Project
Compiled with Delphi 10 Seattle
Price: FREE

Requires Delphi Seattle or Higher
Requires ImageEnVersion 7.0 or Higher

This project supports multiframes, ImageEn version 7.0 image, text and shape layers, brush, line, rectangle and round rectaangle painting with IEBitmap, AlphaChannel and GDICanvas, PDF images with optional support for the WPCubed PDF PlugIn, printing, scanning, deskew and crop, resample, resize, croptool, curves, filling IEColorPalette with custiom palettes, and VCL Themeing and Styles.
To support PDF images, obtain the WPCubed PDF PlugIn and uncomment the pdf code where indicated.



You may download it here:
attach/w2m/2017420145919_PaintBrush.zip
7594.96 KB

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

w2m

USA
1990 Posts

Posted - Apr 28 2017 :  08:33:44  Show Profile  Reply
ImageEn Version 7 Native File Formats With Image, Text, Shape, Polyline and Line Layers With Undo
Update 1
By Bill Miller Adirondack Software & Graphics
Full Source Demo Project
Compiled with Delphi
10 Seattle
Price: FREE



This demo is similar to the AllLayers Demo but adds Polyline custom Shapes and Loading and Saving to ImageEn Native file format (*ien) as well as Undo.
Standard image types such as JPEG and BMP, do not support layers, so to preserve layer information this demo supports the ImageEn Native Format (*.ien)
that loads and saves all layer information in the *.ien file.

Version 1 Download Link:
attach/w2m/201742811240_Native Layers.zip
55.46 KB
Update 1 Download Link:
attach/w2m/2017429194450_Native Layers2.zip
59.45 KB

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

Go to Top of Page

yogiyang

India
691 Posts

Posted - Jun 16 2017 :  07:53:48  Show Profile  Reply
Thanks Bill for the code sample.

It is useful for me in many ways.


Yogi Yang
Go to Top of Page

DianaWelch

USA
4 Posts

Posted - Jun 16 2017 :  21:36:01  Show Profile  Reply
Yeah, it's really a big help. I didn't even realize that I can do that particular effect. Thumbs up for this!
Go to Top of Page

pierrotsc

USA
467 Posts

Posted - Feb 27 2018 :  15:27:32  Show Profile  Reply
@Spectric Thank you for the code to be able to load 8bf files. Really appreciate it. Will try to load some of my plugins to see on how they behave.
Best
Go to Top of Page

HeartWare

Denmark
24 Posts

Posted - Apr 26 2018 :  02:22:35  Show Profile  Reply
Colour Separation of 3D Anaglyph Images

Here's a small demo program on how to extract the individual images from a 3D Anaglyph image. Since there exists both Red/Green and Red/Blue versions of these, it extracts all three colour parts.

When starting up, you get the following screen:



You can then click the upper left part and load an image, like this:



and if you then click on the Red/Green/Blue images, they will toggle between their primary colour and grayscale editions:



The full source of the demo can be downloaded here:
attach/HeartWare/201842621956_ColourSep.zip
55.81 KB

Compiled EXE of demo:
attach/xequte/2018426185833_ColourSep.zip
6422.32 KB


The image I used for this presentation can be downloaded here:
https://pre00.deviantart.net/64b5/th/pre/f/2017/198/6/b/image_relief_3d_anaglyph_rouge_bleu_by_fan2relief3d-d6n0na8.jpg

Go to Top of Page

xequte

6332 Posts

Posted - Apr 26 2018 :  19:10:50  Show Profile  Reply
Nice one, HeartWare. It works really well.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jul 25 2018 :  11:14:36  Show Profile  Reply
ImageEn 8.0 MultiFrame Editor Demo With Frames, Layers and Brush Tools
By Bill Miller Adirondack Software & Graphics
Full Source Demo Project
Compiled with Delphi 10 Tokyo
Price: FREE
Requires ImageEn Version 8.1.1 or Higher

This demo shows how to draw with new (version 8.0) brush tools, clone tools, crop tools and use of new image and text layers with undo, redo, resampling, resizing and converting bitdepths.

The demo also displays layer frames with multiframe images, screen captures, use of solid, gradient, spray, textured, center textured, textured spray, image and erase brushes along with showing how to use BrushTool.TransparencyMode.



Download Link:

attach/w2m/201812613114_BrushTools.zip
191.29 KB

Update 1: PalUtils.pas added to distribution. Eureka log defines removed from project. Performance improved by removing the call to DrawLayers in the OnMouseMove event.

Update 2 07/31/2918: Added missing dependent unit source files to distribution: RGBHSVUtils.pas, RGBHSLUtils.pas, RGBCIEUtils.pas, RGBCMYKUtils.pas, HTMLColors.pas. Work commenced on future update for Shape, Line and Polyline layer suppport.

Update 3 08/01/2018: Added missing Scanlines.pas unit.
This is a significant update. All layer types are now supported:
ielkImage TIEImageLayer Layer that contains an image
ielkShape TIEShapeLayer Layer that displays standard shapes (rectangles, ellipses, stars, etc)
ielkLine TIELineLayer Layer that displays a single line, optionally including a text label and start and ending arrows
ielkPolyline TIEPolylineLayer Layer that displays a polyline or polygon of multiple points
ielkText Layer that displays text
Update 4 08/10/2018: Added image processing and analysis functionality and Color Curves. Note the current version of iexColorCurve.pas will not function with 64-bit compile. The problem has been fixed so contact the developer if you need to use color curves with 64-bit.
Update 5 09/09/18 Final update- minor edits and some improvements.
Update 6 09/22/18 Added ImageEnLayerMView, ColorPicker and floodFill.
Update 7 10/05/18 Added Text of TImageEnLayerMView can be customized
Added BrushStep property for BrushTool Interaction
Update 8 12/05/18 Added mxs.inc used by palutils.pas.
Update 9 12/06/18 Corrected error in Open1Click procedure.

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

w2m

USA
1990 Posts

Posted - Oct 20 2018 :  15:15:00  Show Profile  Reply
Raize DropMaster Demos
By Bill Miller Adirondack Software & Graphics
Full Source Demo Projects
Compiled with Delphi 10 Tokyo
Price: FREE
Requires ImageEn And Raize DropMaster Components

Raize Graphic Source



Raize Graphic Target


These demos show how to drag images from one application to another utilizing OLE drag and drop. VCL drag and drop does not allow drag drop between applications,
but OLE does. OLE drag and drop is usually implemented by delphi components. I know of three such components:

1. Melander DragAndDrop component- Open source http://melander.dk/delphi/dragdrop/
2. Raize Software DropMaster components- $99 https://raize.com/dropmaster/
3. LMD NG Drag&DropPack- $75 https://lmdinnovative.com/shopping
I recommend the Raize Software DropMaster component because it is easy to use,
works well with ImageEn and requires little source code to implement.

DropMaster is a set of components for adding inter-application drag-and-drop
support to Delphi and C++Builder applications for Microsoft Windows.
DropMaster supports dragging and dropping text-based data, graphics, and
custom formats. DropMaster comes with a collection of more than 40 sample
apps, which represent the results of extensive research into the drag and
drop behavior of many popular commercial applications.

I have used the Melander DragAndDrop component in older versions of Delphi but is several years old now and unfortunately, I have not been able to get it to compile in Delphi Tokyo.

These demos consist of two applications:
1. DropMaster Graphic Source Demo
2. DropMaster Graphic Target Demo

The Graphic Source Demo allows dragging an image from TImage and TImageEnView to OLE enabled drag and drop applications such as Microsoft Word, Microsoft Edge and the DropMaster Graphic Target Demo.

Download Link:

Graphic Source: attach/w2m/20181020152349_Source.zip
155.64 KB
Graphic Target: attach/w2m/20181020152422_Target.zip
143.88 KB

Graphic Source and EXE with source:
attach/w2m/201810229055_DropMasterSource.zip
3067.08 KB
Graphic Target and EXE with source:
attach/w2m/201810229255_DropMasterTarget.zip
3146.17 KB
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development

Go to Top of Page
Page: of 8 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
Jump To: