Universal Viewer: 25 Projects in 25 Days

LEADUniversalViewer Video
LEADUniversalViewer Video
LEADUniversalViewer Audio
LEADUniversalViewer Audio
LEADUniversalViewer Image
LEADUniversalViewer Image

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:

Documentation: RasterCodecs

I have finished adding the required controls (LEADTOOLS PlayCtrl and ImageViewer) and writing the code to load images and media files:

Documentation: PlayCtrl Control

Documentation: ImageViewer

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.

About 

LEAD Technologies, Inc.

    Find more about me on:
  • googleplus
This entry was posted in Multimedia Imaging and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *