Compression Group4 and Fax has no effect for tiff.
See original GitHub issuePrerequisites
- 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:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Jmuccigr Yes it will. And that will probably be released this weekend.
Thank you. I understand
auto-grayscale false
andFax/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.