public void FillImages(List <CompositeJpxImages> compositeImage) { for (int index = 0; index < compositeImage.Count; index++) { ColorList.Add(compositeImage[index].ColorImage); if (compositeImage[index].OpacityImage != null) { OpacityList.Add(compositeImage[index].OpacityImage); } else { OpacityList.Add(((MainForm)MdiParent).NoOpacityBitmap); } if (compositeImage[index].PreOpacityImage != null) { PreOpacityList.Add(compositeImage[index].PreOpacityImage); } else { PreOpacityList.Add(((MainForm)MdiParent).NoPreOpacityBitmap); } if (compositeImage[index].OpacityImage != null) { RasterImage combineImage = new RasterImage(compositeImage[index].ColorImage); CombineCommand command = new CombineCommand(compositeImage[index].OpacityImage, new LeadRect(0, 0, compositeImage[index].OpacityImage.Width, compositeImage[index].OpacityImage.Height), new LeadPoint(0, 0), CombineCommandFlags.OperationMultiply); command.Run(combineImage); ImagesList.Add(combineImage); } else { ImagesList.Add(compositeImage[index].ColorImage); } } }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); } if (ImageListControl != null) { ImageListControl.Items.Clear(); } if (ImagesList != null) { ImagesList.Clear(); } if (ColorList != null) { ColorList.Clear(); } if (OpacityList != null) { OpacityList.Clear(); } if (PreOpacityList != null) { PreOpacityList.Clear(); } } base.Dispose(disposing); }