import Foundation public struct Image: Resource { let data: Data let format: Format let width: Int, height: Int let mipLevels: Int public enum Format { case argb8888, abgr8888 case rgb888, bgr888 //case l8, l16, a8, al88 case s3tc_bc1, s3tc_bc2_premul case s3tc_bc2, s3tc_bc3_premul case s3tc_bc3, rgtc_bc4, rgtc_bc5_3dc } } extension Image { init(_ data: Data, format: Format, width: Int, height: Int, mipLevels: Int = 0) { self.data = data self.format = format self.width = width self.height = height self.mipLevels = mipLevels } }