Nisam bas najbolje razumeo sta si hteo ovim da trazis, pa cu ti reci jedan nacin (ImageList-om iz koje kasnije pozivas slike). Takodje pretpostavljam da je u pitanje C#. Sledi kod.
using System.IO;
using UtilityLibrary.WinControls;
namespace ...
{
...
Assembly a = Assembly.GetExecutingAssembly();
ImageList imlist = new ImageList();
imlist.ImageSize = new Size(x, y);
imlist.ColorDepth = ColorDepth.Depth24Bit;
DirectoryInfo theFolder = new Directoryinfo("folder destination");
foreach (FileInfo theFile in theFolder.GetFiles())
{
Bitmap currentImage = new System.Drawing.Bitmap( theFile.FullName );
imlist.Images.AddStrip(currentImage);
}
...
}
Na ovaj naci uvozis slike iz foldera i kreiras ImageList. Moras da vodi racun o tome koji je ColorDepth, jer ako uneses pogresan, nece ti raditi. Takodje vodi racuna i o velicini slika, njihove dimenzije moraju biti deljive sa dimenzijama kode si uneo u deklaraciji. Nadam se da si to trazio ...
|