English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi pals , how can i build an array of pictures in C# , what is the code ? and please tell me how to use it ,thanks

2006-12-26 16:32:40 · 1 answers · asked by Pedram Soltani 1 in Computers & Internet Programming & Design

1 answers

I can't say how to use an array of images if you don't explain what you're using them for. But creating the array is quite simple... I would actually use a NameValueCollection or something similar.

Bitmap myBitmap = new Bitmap("C:\path\filename.ext");

Research the System.Drawing.Bitmap class on Google to learn how to optimally load different kinds of images like JPGs, PNGs, etc. You can set the compression metrics and other types for output to stream or file. However you create your Bitmap object, just use:

NameValueCollection nvcBitmaps = new NameValueCollection();
nvcBitmaps.Add("imagename", myBitmap);

Then you can pull it up either by nvcBitmaps[0] or nvcBitmaps["imagename"]

2006-12-26 16:49:26 · answer #1 · answered by Rex M 6 · 0 0

fedest.com, questions and answers