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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Actions not working with TImageEnIO/TImageEnProc?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - May 22 2013 : 04:55:25
Hi! In ImageEn 4.3.1, it seems I cannot use the included Actions with TImageEnIO and TImageEnProc? The ImageEnView property of the Actions does not show the existing TImageEnIO and TImageEnProc instances! I am forced to use the TImageEnIO and TImageEnProc with TImage instead of TImageEnView because of the missing Transparent property in TImageEnView.

So how can I use the included Actions with TImageEnIO and TImageEnProc?
7   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - May 22 2013 : 14:11:46
Well, it can be simplified:
procedure TForm1.ToolButton1Click(Sender: TObject);
begin
  ExecuteSendersAction(Sender);
end;

procedure TForm1.ExecuteSendersAction(Sender: TObject);
begin
  ImageEnView1.Bitmap.Assign(Image1.Picture.Graphic);
  TButton(Sender).Action.Execute;
  Image1.Picture.Graphic.Assign(ImageEnView1.Bitmap);
  Image1.Repaint;
end;
PeterPanino Posted - May 22 2013 : 13:46:06
Now I use this workaround to circumvent this issue:

procedure TForm1.FormCreate(Sender: TObject);
begin
  // Load dummy picture at program start to avoid button flickering:
  ImageEnView1.IO.LoadFromFileGIF('D:\dummy.gif');

Then in the Button's click-handler:

procedure TForm1.ToolButton1Click(Sender: TObject);
begin
  ImageEnView1.Bitmap.Assign(Image1.Picture.Graphic);
  ImageEnViewConvertToGray1.Execute;
  Image1.Picture.Graphic.Assign(ImageEnView1.Bitmap);
  Image1.Repaint;
end;

This works, but it is cumbersome to write click-handlers like this for all the actions I want to perform. it would be better if the actions had TImageEnIO and TImageEnProc properties.
PeterPanino Posted - May 22 2013 : 13:21:07
There also seems to be an other issue with Actions: If you assign an action to a Button and the ImageEnView component which is assigned to the Button's Action has no image loaded at program start, then the Button flickers very rapidly and continually. Only after an image is loaded into the ImageEnView the flickering stops.
xequte Posted - May 22 2013 : 12:49:27
Hi Peter

I'm afraid the actions do not support TImage (even those that connect directly with its TImageEnIO or TImageEnProc object).



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - May 22 2013 : 12:48:49
You can not because there is no Image or ImageEnProc or ImageEnIO property in the action. Actions are relatively new feature so perhaps this may be added later.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
PeterPanino Posted - May 22 2013 : 12:37:36
It seems you have misunderstood my comment.
ehkhalid Posted - May 22 2013 : 09:04:47
Hi,
imageenproc1.AttachedTimage := image1;
imageenIo1.AttachedTimage := image1;

you can do it manually by assigning image1 at the property Attachedtimage of both imageen cmponents.