开发者

What is the best type to use for returning an image in my C# library project?

开发者 https://www.devze.com 2023-01-02 23:10 出处:网络
I\'m making a project that will scrap information about a movie and return all sorts of goodies. This will be a .dll that other developers will use in their projects.

I'm making a project that will scrap information about a movie and return all sorts of goodies. This will be a .dll that other developers will use in their projects.

For example, if they want to set a pictureBox image to the movies poster, what would be the best way to handle my library returning the image?

//Set the image to The Matrix poster.
pictureBox1.Image = MyLibrary.GetPoster("The Matrix");

Should开发者_Go百科 I return an Image? A Byte[] array?


I would say return a System.Drawing.Image.


Return an image.


I think returning System.Drawing.Bitmap makes it easy to use

0

精彩评论

暂无评论...
验证码 换一张
取 消