question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pink image after extracting pages from multipage tiff

See original GitHub issue

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of Magick.NET
  • I have searched open and closed issues to ensure it has not already been reported

Description

After updating from 7.21.0 to 7.24.1 tiff files are not converted to jpg with the correct colors. All color pages (True Color, YCBCR) that are exported have a pink tone to it.

Steps to Reproduce

using (MagickImageCollection layers = new MagickImageCollection(memStream))
{
      foreach (var layer in layers)
      {
	      using (var memoryStream = new MemoryStream())
		      {
			     layer.Write(memoryStream, MagickFormat.Jpeg);
      
		      }
	      }
      }
  Format: TIFF (Tagged Image File Format)
  Mime type: image/tiff
  Class: DirectClass
  Geometry: 1984x2777+0+0
  Resolution: 240x240
  Print size: 8.26667x11.5708
  Units: PixelsPerInch
  Type: TrueColor
  Base type: TrueColor
  Endianess: LSB
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 5509568
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 232.99 (0.913687)
      standard deviation: 45.5867 (0.178771)
      kurtosis: 7.19807
      skewness: -2.73348
      entropy: 0.47031
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 233.537 (0.915833)
      standard deviation: 47.0883 (0.18466)
      kurtosis: 7.88032
      skewness: -2.8817
      entropy: 0.459614
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 235.167 (0.922225)
      standard deviation: 43.2472 (0.169597)
      kurtosis: 8.2058
      skewness: -2.90587
      entropy: 0.453397
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 233.898 (0.917248)
      standard deviation: 45.335 (0.177784)
      kurtosis: 7.80675
      skewness: -2.84705
      entropy: 0.461107
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 1984x2777+0+0
  Dispose: Undefined
  Iterations: 0
  Scene: 2 of 5
  Compression: JPEG
  Orientation: TopLeft
  Properties:
    date:create: 2021-06-01T23:09:26+02:00
    date:modify: 2019-12-09T03:07:50+01:00
    signature: e0920752af36090512e954b280f241accd193c3da85e178fc1fca6c724f69fa0
    tiff:alpha: unspecified
    tiff:endian: lsb
    tiff:photometric: YCBCR
    tiff:rows-per-strip: 2777
    tiff:software: Kofax standard Multi-Page TIFF Storage Filter v3.03.000
    tiff:subfiletype: PAGE
    tiff:timestamp: 2019:12:09 03:07:50
  Artifacts:
    filename: x.TIF
    verbose: true
  Tainted: False
  Filesize: 1.556MB
  Number pixels: 5.51M
  Pixels per second: 6.638MB
  User time: 1.160u
  Elapsed time: 0:01.829
  Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org

System Configuration

Using the Q8 Any CPU Version of the library inside a mcr.microsoft.com/dotnet/aspnet:5.0 docker base image.

Any ideas guys?

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dlemstracommented, Jun 27, 2021

Can you test this again with the latest release @mohamedhamza7, and close this issue when the pink colors are gone?

1reaction
dlemstracommented, Jun 11, 2021

Thanks for providing the file. It turns out that ImageMagick had a check missing when reading this file. I pushed a patch to resolve this and this should be fixed in the next release of Magick.NET.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pink background colour in output TIFF when reading and ...
I know that a pink background in the output usually indicates that there is a problem with transparency interpretation. I found a number...
Read more >
How to extract a page from a multipage tiff without ...
I have thousands of multipage tiff images which are compressed with JPEG. From time to time, I have to extract a single page...
Read more >
How to split a multipage TIFF file on Windows?
I have a TIFF file with four pages, and I need to edit one of the pages. Windows Picture Viewer can print all...
Read more >
How To Save A PDF In Photoshop - Single & Multi ... - YouTube
As for multi-page PDFs, you must first go to File - Automate - PDF ... PDF 4:26 Exporting Multi-Page PDF In Photoshop 6:01...
Read more >
Multipage TIFF
Each IFD stores a separate page in the tiff image, and this command will effectively give you a list of IFD's containing images....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found