static bool SwizzledA8(int height, int width, int depth, byte[] src_data, uint[] dest_data) { Swizzler swz = new Swizzler((uint)width, (uint)height); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { dest_data[(y * width) + x] = (uint)(src_data[swz.Swizzle((uint)x, (uint)y, (uint)depth)] << 24); } } return(true); }
static bool SwizzledAY8(int height, int width, int depth, byte[] src_data, uint[] dest_data) { Color color = new Color(); Swizzler swz = new Swizzler((uint)width, (uint)height); int index = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++, index = (y * width) + x) { color.A = color.R = color.G = color.B = src_data[swz.Swizzle((uint)x, (uint)y, (uint)depth)]; dest_data[index] = color; } } return(true); }
static bool SwizzledAY8(int height, int width, int depth, byte[] src_data, uint[] dest_data) { Color color = new Color(); Swizzler swz = new Swizzler((uint)width, (uint)height); int index = 0; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++, index = (y * width) + x) { color.A = color.R = color.G = color.B = src_data[swz.Swizzle((uint)x, (uint)y, (uint)depth)]; dest_data[index] = color; } } return true; }
static bool SwizzledA8(int height, int width, int depth, byte[] src_data, uint[] dest_data) { Swizzler swz = new Swizzler((uint)width, (uint)height); for (int y = 0; y < height; y++) for (int x = 0; x < width; x++) dest_data[(y * width) + x] = (uint)(src_data[swz.Swizzle((uint)x, (uint)y, (uint)depth)] << 24); return true; }