public static void ExportPVRHeader(Stream destination, PVRContainerParameters @params) { using (BinaryWriter binWriter = new BinaryWriter(destination, Encoding.UTF8, true)) { binWriter.Write(Version); binWriter.Write((uint)Flags); binWriter.Write((ulong)@params.PixelFormat); binWriter.Write((uint)ColourSpace); binWriter.Write((uint)ChannelType); binWriter.Write(@params.Height); binWriter.Write(@params.Width); binWriter.Write(Depth); binWriter.Write(NumSurfaces); binWriter.Write(NumFaces); binWriter.Write(@params.MipMapCount); binWriter.Write(MetaDataSize); } }
public static void ExportPVR(Stream destination, Stream source, PVRContainerParameters @params) { ExportPVRHeader(destination, @params); source.CopyStream(destination, @params.DataLength); }