byte[] sourceData, byte[] imageData, int imageDataOffset,
int imageSize, Dimensions imageDimensions, int mipmapLevel) {
// No support for 3D compressed formats.
assert imageDimensions.numDimensions != 3 : "No support for 3D compressed formats.";
CompressedBlockData blockData = Util.getBlockCompressionData(imageFormat.getPixelDataType());
final int blocksPerLine = (imageDimensions.width + (blockData.dimensions.width - 1)) / blockData.dimensions.width;
final int blockLineSize = blocksPerLine * blockData.byteCount;
final int numTotalBlocks = imageSize / blockData.byteCount;
final int numLines = numTotalBlocks / blocksPerLine;