As part of the LEAD Technologies 25th anniversary, we are creating 25 projects in 25 days to celebrate LEAD's depth of features and ease of use. Today's project comes from Maen.
What it Does
This C# WinForms project will load/play both raster images and videos in the same window using LEADTOOLS Version 19.
Features Used
Development Progress Journal
Hello, my name is Maen and I am going to create a project that allows the user to select a folder on his machine's hard drive, and display/playback any supported image/Media (Video or Audio) file in the selected folder.
Using LEADTOOLS Document Imaging Suite and LEADTOOLS Multimedia SDKs will provide me with the support of huge set of images and multimedia file formats, without writing many lines of code. For example, the following code shows how you can play a file using LEADTOOLS
PlayCtrl
control:TempPlayer.AutoStart = true; TempPlayer.SourceFile = _fileName;
Also, the following code shows how you can load and display an image file in our
ImageViewer
control:RasterCodecs codecs = new RasterCodecs(); imageViewer1.Image = codecs.Load(SelectedListItem.FileFullName);
I am going to use the LEADTOOLS
RasterCodecs
class as this is the class that provides support for loading raster images:I have finished adding the required controls (LEADTOOLS
PlayCtrl
andImageViewer
) and writing the code to load images and media files:Documentation: PlayCtrl Control
I have finished writing a user-defined class (
MyListItem
class) that represents the list-box item.I successfully ran the project and displayed the different images and media files using this application. So far, I have 7 hours total invested in this application. I have added some comments to the code for easier reading.
Finally, the application is done! It took me around 9 hours to put this together, including designing, testing and debugging.
Thank you my beloved tools for providing this huge set of formats, that I cannot even imagine how long a task like this would take without using our toolkit.
Download the Project
The source code for this sample project can be downloaded from here. To run the project, extract it to the C:\LEADTOOLS 19\Examples\DotNet\CS directory.