/// <summary> /// The convert dd sto bitm info. /// </summary> /// <param name="dds">The dds.</param> /// <returns></returns> /// <remarks></remarks> public static ParsedBitmap.BitmapInfo convertDDStoBitmInfo(DDS.DDS_HEADER_STRUCTURE dds) { ParsedBitmap.BitmapInfo bi = new ParsedBitmap.BitmapInfo(DDS.getBitmapFormat(dds), false); bi.width = (ushort)dds.ddsd.width; bi.height = (ushort)dds.ddsd.height; bi.depth = (ushort)dds.ddsd.depth; bi.mipMapCount = (ushort)dds.ddsd.MipMapCount; bi.bitsPerPixel = (ushort)dds.ddsd.ddfPixelFormat.RGBBitCount; bi.format = (ushort)bi.formatname; bi.type = (ushort)bi.typename; bi.tagtype = "mtib".ToCharArray(); bi.flags = (ushort)dds.ddsd.flags; return bi; }
/// <summary> /// The generate. /// </summary> /// <param name="ddsd">The ddsd.</param> /// <remarks></remarks> public void Generate(DDS.DDSURFACEDESC2 ddsd) { string bitmstring = "mtib"; tagtype = bitmstring.ToCharArray(); // width = ddsd.width; ; // height = ddsd.height; ; // depth=ddsd.depth; /* type=ddsd.; format; formatname; swizzle; flags; regPointX; regPointY; mipMapCount=ddsd.MipMapCount; pixelOffset=d; */ }