Skip to content

Invalid colors in TIF format #2503

Closed
Closed

Description

@AlexLazov

Some TIFF images are displayed incorrectly.
I'm using the latest version Pillow.

dd03

Images TIF:
https://yadi.sk/d/SpI9WGU-3Hh6KQ

Activity

  1. wiredfool commented on May 10, 2017

    @wiredfool
    Member

    This looks something like a color space issue, almost as if we're interpreting YCrCb (the default jpeg space) as RGB (which is what the image is tagged as). I'm not seeing any place where we're obviously going wrong, so ... more digging required.

  2. AlexLazov commented on May 10, 2017

    @AlexLazov
    Author

    I already understood this. If you open using the library, everything is correctly displayed (READ_LIBTIFF = True). By the way, the problem was discussed before.

  3. wiredfool commented on May 10, 2017

    @wiredfool
    Member

    I'm not seeing the previous discussion in github's search.

  4. AlexLazov commented on May 10, 2017

    @AlexLazov
    Author

    One way to solve the problem.
    In the condition _if READ_LIBTIFF or self._compression in ["tiff_ccitt", "group3", ..._ add _jpeg_. Then everything will work.

    File TiffImagePlugin.py, line 1194.

    if READ_LIBTIFF or self._compression in ["tiff_ccitt", "group3",
                                                         "group4", "tiff_jpeg",
                                                         "tiff_adobe_deflate",
                                                         "tiff_thunderscan",
                                                         "tiff_deflate",
                                                         "tiff_sgilog",
                                                         "tiff_sgilog24",
                                                         "tiff_raw_16","jpeg"]:
  5. hugovk commented on Mar 15, 2018

    @hugovk
    Member

    Fixed in #2899.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions