Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, July 24, 2009 9:24:34 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

This example is built in C# with LEADTOOLS Multimedia 16 and Visual Studio 2005.

The example illustrates how you can use our Callback filter to get a handle on the raw image data from a file, and manipulate it accordingly. Specifically, this sample will create a RasterImage from the raw data, and then flip the image upside down.

If you need to be able to process every frame in a file, the convert control should be substituted for the player control. The player control will drop frames as necessary, whereas the convert control will not.
File Attachment(s):
CS_LMVCallback_RasterImage.zip (19kb) downloaded 568 time(s).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, July 27, 2009 8:49:00 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Here is an example in VB.NET that uses our callback filter and convert control.

This example will compress every frame from a sample file to an image directory where the application is running from. It does not do any processing on the image before saving the file, although this would not be difficult to do. The example uses JPEG compression, but any supported output format can be used. For a list of supported output format, please see the following page:
LEADTOOLS File Formats

This process allows you to save the files using any naming convention you'd like.

This sample does create a temporary file during the conversion process.

This file is deleted once the conversion has complete. Another alternative to creating and deleting a temporary file is to set the targetFile property to something like "C:\NUL" which will not create any file but will still work.
File Attachment(s):
VB.NET_Convert_with_Callback.zip (25kb) downloaded 553 time(s).

Edited by moderator Monday, August 19, 2019 8:22:40 AM(UTC)  | Reason: Fixed old link

Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Friday, August 14, 2009 4:35:11 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Rather than using a temporary file that you create and delete, another option is to use the special DOS "throw away" file name: "NUL".  If you use something like c:\NUL for the targetFile property, no file will be written and the callback will be fired as expected.
 
#4 Posted : Friday, April 8, 2011 12:53:21 PM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

I've updated the VB.NET example to use the Visual Studio 2008 and the Leadtools.Multimedia assembly.
File Attachment(s):
VB.NET_Convert_with_Callback_v17.zip (243kb) downloaded 556 time(s).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#5 Posted : Thursday, April 21, 2011 8:02:11 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

For those using C#, here's an updated version for LEADTOOLS Multimedia 17 using VS 2008
File Attachment(s):
CS_LMVCallback_RasterImage.zip (45kb) downloaded 555 time(s).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#6 Posted : Monday, February 20, 2012 5:59:29 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


I have updated the C# project to work with v17.5 and with convert control using VS2008. The updated demo applies simple processing to the frames in the video and saves the modified video as uncompressed AVI.
File Attachment(s):
CS_LMVCallback.zip (11kb) downloaded 558 time(s).
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#7 Posted : Friday, November 3, 2017 4:56:28 PM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Updated versions of the C# and VB.NET projects for LEADTOOLS 19 can now be found here:
https://www.leadtools.com/support/forum/posts/t12344-HOW-TO--Grab-and-Process-Frames-using-LTMM--LEADTOOLS-19

Edited by moderator Tuesday, November 7, 2017 2:45:38 PM(UTC)  | Reason: Not specified

Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.263 seconds.