void WriteFloat(byte[] source, int sourceStart, ImageEngineFormatDetails sourceFormatDetails, byte[] destination, int destStart) { byte[] bytes = sourceFormatDetails.ReadFloatAsArray(source, sourceStart); destination[destStart] = bytes[0]; destination[destStart + 1] = bytes[1]; destination[destStart + 2] = bytes[2]; destination[destStart + 3] = bytes[3]; }
/// <summary> /// Calculates the compressed size of an image with given parameters. /// </summary> /// <param name="numMipmaps">Number of mipmaps in image. JPG etc only have 1.</param> /// <param name="formatDetails">Detailed information about format.</param> /// <param name="width">Width of image (top mip if mip-able)</param> /// <param name="height">Height of image (top mip if mip-able)</param> /// <returns>Size of compressed image.</returns> public static int GetCompressedSize(int numMipmaps, ImageEngineFormatDetails formatDetails, int width, int height) { return(DDS.DDSGeneral.GetCompressedSizeOfImage(numMipmaps, formatDetails, width, height)); }
void WriteByte(byte[] source, int sourceStart, ImageEngineFormatDetails sourceFormatDetails, byte[] destination, int destStart) { destination[destStart] = sourceFormatDetails.ReadByte(source, sourceStart); }