Browse Source

Add a number of TIFF specific constants/enums

pull/1570/head
Andrew Wilkinson 9 years ago
parent
commit
a073a9a2d4
  1. 37
      src/ImageSharp.Formats.Tiff/Constants/TiffCompression.cs
  2. 0
      src/ImageSharp.Formats.Tiff/Constants/TiffConstants.cs
  3. 19
      src/ImageSharp.Formats.Tiff/Constants/TiffExtraSamples.cs
  4. 18
      src/ImageSharp.Formats.Tiff/Constants/TiffFillOrder.cs
  5. 31
      src/ImageSharp.Formats.Tiff/Constants/TiffNewSubfileType.cs
  6. 24
      src/ImageSharp.Formats.Tiff/Constants/TiffOrientation.cs
  7. 40
      src/ImageSharp.Formats.Tiff/Constants/TiffPhotometricInterpretation.cs
  8. 18
      src/ImageSharp.Formats.Tiff/Constants/TiffPlanarConfiguration.cs
  9. 19
      src/ImageSharp.Formats.Tiff/Constants/TiffResolutionUnit.cs
  10. 19
      src/ImageSharp.Formats.Tiff/Constants/TiffSubfileType.cs
  11. 0
      src/ImageSharp.Formats.Tiff/Constants/TiffTags.cs
  12. 19
      src/ImageSharp.Formats.Tiff/Constants/TiffThreshholding.cs
  13. 0
      src/ImageSharp.Formats.Tiff/Constants/TiffType.cs

37
src/ImageSharp.Formats.Tiff/Constants/TiffCompression.cs

@ -0,0 +1,37 @@
// <copyright file="TiffCompression.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the compression formats defined by the Tiff file-format.
/// </summary>
internal enum TiffCompression
{
// TIFF baseline compression types
None = 1,
Ccitt1D = 2,
PackBits = 32773,
// TIFF Extension compression types
CcittGroup3Fax = 3,
CcittGroup4Fax = 4,
Lzw = 5,
OldJpeg = 6,
// Technote 2
Jpeg = 7,
Deflate = 8,
OldDeflate = 32946,
// TIFF-F/FX Extension
ItuTRecT82 = 9,
ItuTRecT43 = 10
}
}

0
src/ImageSharp.Formats.Tiff/TiffConstants.cs → src/ImageSharp.Formats.Tiff/Constants/TiffConstants.cs

19
src/ImageSharp.Formats.Tiff/Constants/TiffExtraSamples.cs

@ -0,0 +1,19 @@
// <copyright file="TiffExtraSamples.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the possible uses of extra-samples in TIFF format files.
/// </summary>
internal enum TiffExtraSamples
{
// TIFF baseline ExtraSample values
Unspecified = 0,
AssociatedAlpha = 1,
UnassociatedAlpha = 2
}
}

18
src/ImageSharp.Formats.Tiff/Constants/TiffFillOrder.cs

@ -0,0 +1,18 @@
// <copyright file="TiffFillOrder.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the fill orders defined by the Tiff file-format.
/// </summary>
internal enum TiffFillOrder
{
// TIFF baseline FillOrder values
MostSignificantBitFirst = 1,
LeastSignificantBitFirst = 2
}
}

31
src/ImageSharp.Formats.Tiff/Constants/TiffNewSubfileType.cs

@ -0,0 +1,31 @@
// <copyright file="TiffNewSubfileType.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
using System;
/// <summary>
/// Enumeration representing the sub-file types defined by the Tiff file-format.
/// </summary>
[Flags]
internal enum TiffNewSubfileType
{
// TIFF baseline subfile types
FullImage = 0x0000,
Preview = 0x0001,
SinglePage = 0x0002,
TransparencyMask = 0x0004,
// DNG Specification subfile types
AlternativePreview = 0x10000,
// TIFF-F/FX Specification subfile types
MixedRasterContent = 0x0008
}
}

24
src/ImageSharp.Formats.Tiff/Constants/TiffOrientation.cs

@ -0,0 +1,24 @@
// <copyright file="TiffOrientation.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the image orientations defined by the Tiff file-format.
/// </summary>
internal enum TiffOrientation
{
/// TIFF baseline Orientation values
TopLeft = 1,
TopRight = 2,
BottomRight = 3,
BottomLeft = 4,
LeftTop = 5,
RightTop = 6,
RightBottom = 7,
LeftBottom = 8
}
}

40
src/ImageSharp.Formats.Tiff/Constants/TiffPhotometricInterpretation.cs

@ -0,0 +1,40 @@
// <copyright file="TiffPhotometricInterpretation.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the photometric interpretation formats defined by the Tiff file-format.
/// </summary>
internal enum TiffPhotometricInterpretation
{
// TIFF baseline color spaces
WhiteIsZero = 0,
BlackIsZero = 1,
Rgb = 2,
PaletteColor = 3,
TransparencyMask = 4,
// TIFF Extension color spaces
Separated = 5,
YCbCr = 6,
CieLab = 8,
// TIFF TechNote 1
IccLab = 9,
// TIFF-F/FX Specification
ItuLab = 10,
// DNG Specification
ColorFilterArray = 32803,
LinearRaw = 34892
}
}

18
src/ImageSharp.Formats.Tiff/Constants/TiffPlanarConfiguration.cs

@ -0,0 +1,18 @@
// <copyright file="TiffCompression.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the planar configuration types defined by the Tiff file-format.
/// </summary>
internal enum TiffPlanarConfiguration
{
// TIFF baseline PlanarConfiguration values
Chunky = 1,
Planar = 2
}
}

19
src/ImageSharp.Formats.Tiff/Constants/TiffResolutionUnit.cs

@ -0,0 +1,19 @@
// <copyright file="TiffResolutionUnit.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the resolution units defined by the Tiff file-format.
/// </summary>
internal enum TiffResolutionUnit
{
// TIFF baseline ResolutionUnit values
None = 1,
Inch = 2,
Centimeter = 2
}
}

19
src/ImageSharp.Formats.Tiff/Constants/TiffSubfileType.cs

@ -0,0 +1,19 @@
// <copyright file="TiffSubfileType.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the sub-file types defined by the Tiff file-format.
/// </summary>
internal enum TiffSubfileType
{
// TIFF baseline subfile types
FullImage = 1,
Preview = 2,
SinglePage = 3
}
}

0
src/ImageSharp.Formats.Tiff/TiffTags.cs → src/ImageSharp.Formats.Tiff/Constants/TiffTags.cs

19
src/ImageSharp.Formats.Tiff/Constants/TiffThreshholding.cs

@ -0,0 +1,19 @@
// <copyright file="TiffThreshholding.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Formats
{
/// <summary>
/// Enumeration representing the threshholding types defined by the Tiff file-format.
/// </summary>
internal enum TiffThreshholding
{
/// TIFF baseline Threshholding values
None = 1,
Ordered = 2,
Random = 3
}
}

0
src/ImageSharp.Formats.Tiff/TiffType.cs → src/ImageSharp.Formats.Tiff/Constants/TiffType.cs

Loading…
Cancel
Save