static private ReadUncompressed ( byte source, int sourceStart, byte destination, int pixelCount, |
||
source | byte | |
sourceStart | int | |
destination | byte | |
pixelCount | int | |
ddspf | ||
return | void |
private static MipMap ReadUncompressedMipMap(MemoryStream stream, int mipOffset, int mipWidth, int mipHeight, DDS_Header.DDS_PIXELFORMAT ddspf, ImageFormats.ImageEngineFormatDetails formatDetails) { byte[] data = stream.GetBuffer(); byte[] mipmap = new byte[mipHeight * mipWidth * 4 * formatDetails.ComponentSize]; // Smaller sizes breaks things, so just exclude them if (mipHeight >= 4 && mipWidth >= 4) { DDS_Decoders.ReadUncompressed(data, mipOffset, mipmap, mipWidth * mipHeight, ddspf, formatDetails); } return(new MipMap(mipmap, mipWidth, mipHeight, formatDetails)); }