@ -49,7 +49,8 @@ namespace ImageSharp.Formats
/// The values are derived from section K.1 after converting from natural to
/// zig-zag order.
/// </summary>
private readonly byte[,] unscaledQuant = {
private readonly byte[,] unscaledQuant =
{
// Luminance.
16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40,
@ -71,7 +72,8 @@ namespace ImageSharp.Formats
/// The Huffman encoding specifications.
/// This encoder uses the same Huffman encoding for all images.
private readonly HuffmanSpec[] theHuffmanSpec = {
private readonly HuffmanSpec[] theHuffmanSpec =
// Luminance DC.
new HuffmanSpec(
new byte[]
@ -611,7 +611,7 @@ namespace ImageSharp.Formats
/// <param name="stream">The stream.</param>
private void WriteDataChunks(Stream stream)
byte[] data = this.EncodePixelData();
byte[] buffer;
int bufferLength;
@ -184,8 +184,8 @@ namespace ImageSharp.Formats
this.deflateStream.Dispose();
this.deflateStream = null;
}
else {
else
// Hack: empty input?
this.rawStream.WriteByte(3);
this.rawStream.WriteByte(0);
@ -575,8 +575,7 @@ namespace ImageSharp.IO
int read = this.BaseStream.Read(data, index, size - index);
if (read == 0)
throw new EndOfStreamException
throw new EndOfStreamException(
(
string.Format(
"End of stream reached with {0} byte{1} left to read.",
size - index,
@ -361,8 +361,7 @@ namespace ImageSharp
private static TDataType[] ToArray<TDataType>(ExifDataType dataType, byte[] data,
private static TDataType[] ToArray<TDataType>(ExifDataType dataType, byte[] data, ConverterMethod<TDataType> converter)
ConverterMethod<TDataType> converter)
int dataTypeSize = (int)ExifValue.GetSize(dataType);
int length = data.Length / dataTypeSize;
@ -3,8 +3,8 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices;
// General Information about an assembly is controlled through the following