Skip to content

Conversation

@brianpopow
Copy link
Collaborator

@brianpopow brianpopow commented Dec 3, 2020

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

This PR adds support for TIFF decoding and encoding.

The specification can be found here: TIFF spec
Or as a PDF in the tiff folder (ImageSharp\Formats\Tiff).

Currently the Encoder and Decoder support the following:

Baseline TIFF

  • Bilevel Images aka Black and White images.
  • Grayscale Images
  • Palette-color Images
  • RGB Full Color Images
  • PackBits Compression
  • Modified Huffman Compression (Ccitt1D)

TIFF Extensions

  • CcittGroup3Fax
  • LZW compression
  • Deflate compression
  • Differencing Predictor

The following extension features will probably not be part of the first release of the TIFF format support.

  • CcittGroup4Fax
  • JPEG Compression Technote 2
  • Tiled Images
  • TransparencyMask
  • Separated (TIFF Extension color spaces)
  • YCbCr (TIFF Extension color spaces)
  • CieLab (TIFF Extension color spaces)
  • IccLab (TechNote 1)

TODO's

  • Issue with LZW decoding with some images, for example: rgb_lzw_no_predictor.tiff Fixed with #12 Tiff specific fixes for LZW #1457
  • Deflate compression uses deflate implementation of PNG, we should move that now to a common place
  • There is still an issue with LZW. Compression a byte array with LZW and then decompress it again does not yield in the original byte array. See failing tests. fixed with da51a4f

@brianpopow brianpopow requested a review from a team December 3, 2020 11:58
@brianpopow brianpopow marked this pull request as draft December 3, 2020 11:58
@brianpopow brianpopow linked an issue Dec 3, 2020 that may be closed by this pull request
25 tasks
@brianpopow brianpopow self-assigned this Dec 3, 2020
@brianpopow brianpopow added this to the Future milestone Dec 3, 2020
@JimBobSquarePants
Copy link
Member

@IldarKhayrutdinov @brianpopow Have either of you seen this library? I wonder if there's some features we can compare there.

https://github.com/yigolden/TiffLibrary/blob/master/Documentation/supported-tiff-features.md

@IldarKhayrutdinov
Copy link
Contributor

@IldarKhayrutdinov @brianpopow Have either of you seen this library? I wonder if there's some features we can compare there.

https://github.com/yigolden/TiffLibrary/blob/master/Documentation/supported-tiff-features.md

I haven't seen, but it seems we can benefit from her, for example features: BigTIFF, tiled; TiffGray16 Pixel, CMYK, YCbCr Photometric; T4, T6, JPEG, ThunderScan, NeXT compressions; and we can compare performance for existing features.

@brianpopow
Copy link
Collaborator Author

@IldarKhayrutdinov @brianpopow Have either of you seen this library? I wonder if there's some features we can compare there.

https://github.com/yigolden/TiffLibrary/blob/master/Documentation/supported-tiff-features.md

I have not seen that either. As @IldarKhayrutdinov said, good to see how others have implemented some features and to compare performance against.

@JimBobSquarePants
Copy link
Member

Dunno why this got closed. Something to do with the LFS changes I think.

@JimBobSquarePants JimBobSquarePants mentioned this pull request Feb 17, 2021
17 tasks
@JimBobSquarePants
Copy link
Member

PR is now at #1553 due to Git LFS force push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No Tiff support.