dlemstra / dlemstra/Magick.NET

Corrupt pixels when clipping CMYK TIFF

Open
#2,036 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4k
Forks
451
Avg merge
11h 55m
Merged PRs (30d)
3

Description

### Magick.NET version

Q8 x64 14.14

### Environment (Operating system, version and so on)

Linux alpine/Windows 11

### Description

Hi,

Clip() on a CMYK TIFF after TransformColorSpace to sRGB produces a noisy artifact band

14.12:

Image

14.14:

Image

Diff:

Image

### Steps to Reproduce

```
using (var img = new MagickImage("input.tif")) // CMYK TIFF
{
img.TransformColorSpace(ColorProfiles.SRGB);
img.Alpha(AlphaOption.Transparent);
img.Clip(ClipName);
img.Alpha(AlphaOption.Opaque);
img.Resize(Out, Out);
using var bg = new MagickImage(MagickColors.BlueViolet, Out, Out);
bg.Composite(img, CompositeOperator.Over);
bg.Write("clipped.png");
}
```

### Images

[input.tif](https://github.com/user-attachments/files/28845719/input.tif)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.