Click here to Skip to main content
15,615,448 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
if you say object class then please show me the code how to get the image or the video from that

What I have tried:

tried by coding a class [superficial class image]and returning back the class but of no use....should it would read an image file in the datatype byte ?
Updated 26-Feb-21 10:02am
Member 12712527 26-Feb-21 13:22pm    
Okay sir good night tomorrow i will see your words
Gerry Schmitz 26-Feb-21 13:28pm    
At the most basic level, they're (byte) "streams". It's what one does before or after that varies: bitmap, file, whatever.

Image has a specific class - predictably called the Image Class (System.Drawing) | Microsoft Docs[^] for WinForms, the Image Class (System.Windows.Controls) | Microsoft Docs[^] for WPF, and the Image Class (System.Web.UI.WebControls) | Microsoft Docs[^] for websites.

There is no similar "standard class" for videos.

Check the relevant class above, and you will see what it can be created from.
Share this answer
Gerry Schmitz 26-Feb-21 14:25pm    
More specifically, if one "knows" it's an "image file", one uses a URL to assign the file to the image "control". An image control is not an image "data type".

(Not into "down voting")
In addition to OriginalGriffs and Gerry's answers, for working with video usually 3rd party libraries are used.
A popular open-source library is FFmpeg.NET: .NET wrapper for common ffmpeg tasks[^]
There are also numerous paid libraries which can be quite expensive.

When working with video we usually talk about the Video Format, more information can be found here: Video file format - Wikipedia[^]

And as Gerry suggested, there is also a MediaElement Class (System.Windows.Controls) | Microsoft Docs[^]
There are some pitfalls however when using these controls, see this CodeProject article:
In C# how do I display Streaming H264 TS video in form project[^]
Share this answer
Gerry Schmitz 27-Feb-21 11:04am    
If you're going to talk "controls" instead of "data types" (as the OP requested), try "Media Element" control for playing videos. Makes about as much sense as the other answer.
RickZeeland 27-Feb-21 12:21pm    
Thought that was something of the past, but it still seems to exist :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900