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
 Replace selected image from ImageEnMView

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
monzeryazigi Posted - Aug 22 2016 : 16:35:15
Hi
I have a ImageEnMView component, where 5 frames are created from Video stream.

I need to replace one of the frames with another frame of the video.

How to do that?

Thanks

Monzer Yazigi
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 23 2016 : 19:47:29
Hi Monzer

There must be something else going on. Just for sanity I ran the MultiView2 demo and loaded a multipage TIFF.

All of the following worked:

procedure TMainForm.Button1Click(Sender: TObject);
Begin
  ImageEnVect1.IO.LoadFromFile( 'D:\_Testfiles\ds1.jpg' );
  ImageEnMView1.SetImage( 1, ImageEnVect1.IEBitmap );
End;

procedure TMainForm.Button1Click(Sender: TObject);
Var
  bmp: TIEBitmap;
Begin
  bmp := TIEBitmap.Create;
  bmp.read( 'D:\_Testfiles\ds1.jpg' );
  ImageEnMView1.DeleteImage( 1 );
  ImageEnMView1.InsertImage( 1, bmp );
  bmp.free;
End;

procedure TMainForm.Button1Click(Sender: TObject);
Var
  bmp: TIEBitmap;
Begin
  bmp := TIEBitmap.Create;
  bmp.read( 'D:\_Testfiles\ds1.jpg' );
  ImageEnMView1.SetImage( 1, bmp );
  bmp.free;
End;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
monzeryazigi Posted - Aug 23 2016 : 16:03:49
Hi Bill,
Thanks for responding.
Yes, imgindex is the SelectedImage to be replaced.
I tried update, I tried refresh but nothing works.

Monzer Yazigi
w2m Posted - Aug 23 2016 : 11:34:48
Is imgindex the ImageEnMView.SelectedImage?
Did you call ImageEnMView.Update after replacing the image. If you did not call update then the new bitmap may not be shown.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
monzeryazigi Posted - Aug 23 2016 : 01:33:48
Hi Nigel,
I tried both ways, its not working. I tried:
Way 1
------
ImageEnMView1.DeleteImage(imgindex);
ImageEnMView1.InsertImage(imgindex, ImageEnView1.IEBitmap);

Way 2
------
ImageEnMView1.SetImage( imgindex, ImageEnView1.IEBitmap);

Both didnt work. Simply ImageEnMView does not replace the image.

Please advise

Monzer Yazigi
xequte Posted - Aug 22 2016 : 23:50:51
Hi Monzer

You could just delete the existing frame, and insert a new one.

Or you could replace the bitmap of an existing frame, e.g.

ImageEnMView1.SetImage( 5, MyNewBitmap );

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com