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.

Compression Group4 and Fax has no effect for 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

Using ImageMagick, it is easy to create Group4/Fax compressed tiff: % magick logo: -compress Group4 tmp.tif % magick logo: -compress Fax tmp.tif But the following Magick.NET program (in Steps to Reproduce) does not compress the file: It prints: LZW Zip RLE NoCompression NoCompression NoCompression

Steps to Reproduce

using System;
using System.IO;
using ImageMagick;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string outFile = "./tmp.tif";
            foreach (var c in new CompressionMethod[]
            {
                CompressionMethod.LZW,
                CompressionMethod.Zip,
                CompressionMethod.RLE,
                CompressionMethod.Group4,
                CompressionMethod.Fax,
                CompressionMethod.NoCompression
            }) {
                MagickReadSettings settings = new MagickReadSettings();
                using (var image = new MagickImage("logo:", settings))
                {
                    image.Format = MagickFormat.Tiff;
                    image.Settings.Compression = c;
                    image.Write(outFile);
                }
                using (var image = new MagickImage(outFile))
                {
                    Console.WriteLine(image.Compression);
                }
                File.Delete(outFile);
            }
        }
    }
}

System Configuration

  • Magick.NET version: 7.7.0 Q16 AnyCPU
  • Environment (Operating system, version and so on): Windows 7 64bit
  • Additional information:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dlemstracommented, Sep 22, 2018

@Jmuccigr Yes it will. And that will probably be released this weekend.

0reactions
t246246commented, Sep 28, 2018

Thank you. I understand auto-grayscale false and Fax/Group4 have some kind of contradiction, but I had thought both -define and -set are valid setting: https://www.imagemagick.org/discourse-server/viewtopic.php?t=28453#p126332 , but guessing from current document, https://www.imagemagick.org/script/command-line-options.php#define , using -define for this purpose for tiff is not proper.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TIFF Bitmap with Group 4 Compression
A tag-based file format for storing and interchanging raster images; in this subtype, TIFF wraps a bitmap compressed using ITU_G4 (ITU-T T.6.
Read more >
TIFF compression not working?
Is there a problem with tiff group4 and fax compression? I'm having trouble getting good compression with them, and perhaps coincidentally ...
Read more >
Gimp: Save tiff with a "Group 4 Fax" compression
Group 4 Fax compression only applies to bitmap (1 bit per pixel) images. Change the image to bitmap, then the option should be...
Read more >
File Formats: TIFF CCITT and Other FAX Formats
These are TIFF CCITT files in a format that is more advanced and more compressed than TIFF CCITT. LEADTOOLS supports both 1-dimension and...
Read more >
What TIFF Compression Should You Use? ZIP or LZW?
There are two main reasons you might not use ZIP or LZW compression. Because they require more processing to open and close them,...
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