/// <summary> /// Create a GSImage backed with a new %Gimp# Image. /// </summary> /// <param name="width"></param> /// <param name="height"></param> public GSImage(int width, int height) { _image = new Gimp.Image(width, height, ImageBaseType.Gray); Layer layer = new Layer(_image, "default", width, height, ImageType.Gray, 100, LayerModeEffects.Normal); _image.AddLayer(layer, 0); _drawable = _image.ActiveDrawable; _rectangle = _drawable.MaskBounds; Tile.CacheDefault(_drawable); Progress = new Progress("Halftone Laboratory"); }
protected Image NewImage(int width, int height, ImageBaseType baseType, ImageType type, string filename) { var image = new Image(width, height, baseType) {Filename = filename}; var layer = new Layer(image, "Background", type); image.AddLayer(layer, 0); return image; }