module image.Image; private { import utils.Memory; } enum ImageFormat { Grayscale, RGB, RGBA } enum DataFormat { Byte, SignedByte, Float } class ImagePlane { void[] data; char[] source; int width; int height; int depth; bool opaque = true; this() {} this(void[] data, char[] source, int width, int height, int depth) { this.data = data; this.source = source; this.width = width; this.height = height; this.depth = depth; } ~this() { data.free(); } } class Image { ImagePlane[] planes; ImageFormat imageFormat = ImageFormat.RGB; DataFormat dataFormat = DataFormat.Byte; }