ImageSharp Documentation

repository·main·Indexed 27 days ago

https://github.com/sixlabors/imagesharp

A high-performance, fully managed, and cross-platform 2D graphics API for .NET designed for image processing across device, cloud, and embedded/IoT scenarios. It includes support for various formats such as TGA and TIFF, with detailed capabilities for TIFF compression, photometric interpretation, and baseline/extension tags.

Tokens
1.2K
Snippets
1
Records
9
Agent score
43%

What's inside ImageSharp

  1. Manually build ImageSharp from source

    main

    You can compile ImageSharp yourself using Visual Studio 2022 or via the command line on Windows and Linux/Unix.

    Prerequisites

    Setup Steps

    1. Clone the repository:
    git clone https://github.com/SixLabors/ImageSharp
    1. Configure Git to ignore mass reformatting commits:
    git config blame.ignoreRevsFile .git-blame-ignore-revs
    1. (Windows only) Enable long file paths (run as Administrator):
    git config --system core.longpaths true
    1. Initialize submodules:
    git submodule update --init --recursive
    git clone https://github.com/SixLabors/ImageSharp
    git config blame.ignoreRevsFile .git-blame-ignore-revs
    git config --system core.longpaths true
    git submodule update --init --recursive
  2. TIFF Photometric Interpretation Support

    main

    The TIFF codec supports several photometric interpretation formats for color and grayscale representation.

    Supported Photometric Interpretations

    FormatEncoderDecoderComments
    WhiteIsZeroYYGeneral + 1/4/8-bit optimised
    BlackIsZeroYYGeneral + 1/4/8-bit optimised
    Rgb (Chunky)YYGeneral + Rgb888 optimised
    Rgb (Planar)YGeneral implementation only
    PaletteColorYYGeneral implementation only
    TransparencyMask
    Separated (TIFF Extension)Y
    YCbCr (TIFF Extension)Y
    CieLab (TIFF Extension)Y
    CMYKY
    Tiled ImagesY
  3. TIFF Compression Format Support

    main

    The ImageSharp TIFF codec supports various compression formats for both encoding and decoding. Note that the Decoder currently only supports decoding multi-frame images if they have the same dimensions.

    Supported Compression Formats

    FormatEncoderDecoderComments
    NoneYY
    Ccitt1DYY
    PackBitsYY
    CcittGroup3FaxYY
    CcittGroup4FaxYY
    LzwYYBased on ImageSharp GIF LZW implementation
    Old JpegYOnly with chunky configuration
    Jpeg (Technote 2)YY
    Deflate (Technote 2)YYBased on PNG Deflate
    Old Deflate (Technote 2)Y
    WebpY
  4. TIFF Extension and Private Tags Reference

    main

    The TIFF codec supports various extension and private tags. Below is a list of notable tags and their support status.

    Extension Tags (Selected)

    TagEncoderDecoderComments
    DocumentNameYY
    PageNameYY
    PredictorYYOnly Horizontal
    InkSetYCMYK
    YCbCrCoefficientsY
    YCbCrSubSamplingY
    XMPYY

    Private Tags (Selected)

    TagEncoderDecoderComments
    IPTCYY
    ICC ProfileYY
    Exif IFD-0x8769 SubExif
  5. TIFF Baseline Tags Reference

    main

    The following Baseline TIFF tags are supported by the ImageSharp TIFF codec. Use these to understand which metadata properties can be encoded or decoded.

    TagEncoderDecoderComments
    ImageWidthYY
    ImageLengthYY
    BitsPerSampleYY
    CompressionYY
    PhotometricInterpretationYY
    ImageDescriptionYY
    MakeYY
    ModelYY
    StripOffsetsYY
    Orientation-Ignored
    SamplesPerPixelY-Ignored (inferred from BitsPerSample)
    RowsPerStripYY
    StripByteCountsYY
    XResolutionYY
    YResolutionYY
    PlanarConfigurationYEncoding support only chunky
    ResolutionUnitYY
    SoftwareYY
    DateTimeYY
    ArtistYY
    HostComputerYY
    ColorMapYY
    CopyrightYY
    ExtraSamplesYUnspecified alpha data is not supported