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
 ImageEnView.ScrollBy to center Image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Ralf

112 Posts

Posted - Jan 19 2017 :  09:39:53  Show Profile  Reply
Hallo,

i use a ImageEnView to show the Input of a Webcam. I sized the ImageEnView to show not the complete Imagewidth. What i want to do is to center the image in horizontal direction.

I tried with ImageDirectShow.ScrollBy. I have tried with differnt values vor x. Nothing happens the scrollbar still was on the left side.

Any Idear what the error can be?

Thanks

Ralf

xequte

38176 Posts

Posted - Jan 19 2017 :  18:27:22  Show Profile  Reply
Hi Ralf

Why not use:

http://www.imageen.com/help/TImageEnView.ImageHorizAlignment.html


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

Ralf

112 Posts

Posted - Jan 20 2017 :  03:50:03  Show Profile  Reply
Hi Nigel,

the Value is iehCenter. But it isn't centered. I always see the left corner. Is there any other parameter that maybe disable this function when it is active?
What i do is to say FittoHeight.

To see if a change to the position works i also tried iehright. Also nothing happend.

Best Regards
Ralf
Go to Top of Page

xequte

38176 Posts

Posted - Jan 20 2017 :  14:13:40  Show Profile  Reply
Hi Ralf

OK, if there is a scrollbar visible then you can use ViewX/ViewY to move the image:

http://www.imageen.com/help/TImageEnView.ViewX.html

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

Ralf

112 Posts

Posted - Jan 23 2017 :  03:49:20  Show Profile  Reply
Hi Nigel,

i have made a few test's. I have to ImageEnView's on my Form
1. ImagePassport
2. ImageDirectShow

The ImagePassport only shows a Image (SnapShot from ImageDirectShow). The ImageDirectShow shows the incoming signal of a WebCam.

Centering the Image with ImageHorizAlignment:=iehCenter; don't work by both. Why not I don't know.

The ViewX:=xy seems only working if a image is displayed. When i do it in the ImageDirectShow after the first

ImageDirectShow.IO.DShowParams.GetSample(ImageDirectShow.Layers[0].Bitmap);
ImageDirectShow.Update;

If FirstTime then
begin
  ImageDirectShow.ViewX:=yx;
  FirstTime:=false;
end;

it works. It would be nicer if i can use ieCenter. The ViewX also works without a Scrollbar. I only had show the scrollbar to see if Centering or changing the view position work.

Thanks and best regards
Ralf
Go to Top of Page

xequte

38176 Posts

Posted - Jan 23 2017 :  20:20:37  Show Profile  Reply
Hi Ralf

Yes, there is not a property for centering images that are larger than the display size.

I forgot to mention, there is also the method:

TImageEnView.CenterImage();

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

Ralf

112 Posts

Posted - Jan 24 2017 :  03:44:55  Show Profile  Reply
Hi Nigel,

i changed it to CenterImage and it work.

Thanks
Ralf
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: