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
 Digital zoom with DirectShow?

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
whisper1980 Posted - Apr 17 2021 : 18:33:39
I can do digital zoom with the Media Foundation methods via:
ImageEnView1.IO.MediaFoundationSourceReader.VideoProcessor.SetSourceRectangle(vRect);

But I can't seem to find a way to do it with DirectShow. Any hints you can provide? I tried using the following, but didn't seem to do anything, even forcing RenderVideo to true (it was false after a fDirectShow.Connect or fDirectShow.Run yet was showing the video stream using EnableSampleGrabber):
fDirectShow.SetVideoRenderRect(vSrcRect, vDstRect);

Thanks,

Eric
2   L A T E S T    R E P L I E S    (Newest First)
whisper1980 Posted - Apr 19 2021 : 20:01:40
Thanks, this seems to do the trick...

fDirectShow.GetSample(ImageEnView1.IEBitmap);
ImageEnView1.Proc.Crop(0,0, 200,200);
ImageEnView1.Update;

But of course, instead of 0,0 200,200, I update the x, y positions based on my digital zoom values like I did with my MediaFoundation version.


Eric
xequte Posted - Apr 19 2021 : 17:42:55
Hi Eric

SetVideoRenderRect is called internally by ImageEnView each time is painted, so you cannot use it directly. It is used to output the video at the size of the TImageEnView bitmap. So you should use the zoom and positioning properties of TImageEnView to adjust the video rect.

Nigel
Xequte Software
www.imageen.com