After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 162119 - Saving black/white TIFF with 'CCITT Group 4' encoding
Saving black/white TIFF with 'CCITT Group 4' encoding
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
unspecified
Other All
: Low enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
: 307010 (view as bug list)
Depends on: 150865
Blocks:
 
 
Reported: 2004-12-23 20:37 UTC by Marc 'BlackJack' Rintsch
Modified: 2007-02-14 08:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allows the user to save tiff images as CCITT Group 4. (1.25 KB, patch)
2007-01-25 15:10 UTC, Manfred Joerg
none Details | Review
largely reworked patch (14.91 KB, patch)
2007-01-28 18:36 UTC, Sven Neumann
none Details | Review
fixed patch (15.76 KB, patch)
2007-01-28 18:54 UTC, Sven Neumann
committed Details | Review

Description Marc 'BlackJack' Rintsch 2004-12-23 20:37:20 UTC
It would be nice to be able to use the Group 4 FAX encoding for saving black 
and white images.  Black and white means a bit depth of 1 in this case.  The 
compression algorithm is taylored for that kind of data and yields a better 
compression ratio than PNG or GIF.
Comment 1 Joao S. O. Bueno 2004-12-23 21:44:19 UTC
I am dealing with TIFF reading and writing right now, and I think I can handle 
this in short term. 
 
Comment 2 Marc 'BlackJack' Rintsch 2004-12-24 21:08:38 UTC
This feature request shares some technical issues with bug #150865 I think. 
Comment 3 Sven Neumann 2005-01-03 13:45:52 UTC
Isn't it even a duplicate of bug #150865 ?
Comment 4 Manish Singh 2005-01-03 17:40:29 UTC
No, since CCITT FAX4 isn't a save compression option. It would be easy to add
the option, but perhaps it'd be worth hiding/disabling invalid compression
options for a given file type instead of erroring later.
Comment 5 Manish Singh 2005-06-09 17:42:58 UTC
*** Bug 307010 has been marked as a duplicate of this bug. ***
Comment 6 Manfred Joerg 2007-01-25 15:10:15 UTC
Created attachment 81195 [details] [review]
Allows the user to save tiff images as CCITT Group 4.

I think that I fixed bug 162119. My patch allows the user to save TIFF images with CCITT Group 4. The advantage of this file format is that a scanned text page (600 dpi) takes only 100 KByte.

The patch is based on version 2.3.14. I only added the option to the dialog and an error message which informs the user that only black / white images can be saved as CCITT Group 4. The tiff library already contains the necessary code.
Comment 7 Sven Neumann 2007-01-26 22:47:18 UTC
The error message needs to be marked as translatable. It should perhaps also give the user a hint on how to make an image b/w (convert to indexed colormap with b/w palette).
Comment 8 Sven Neumann 2007-01-28 18:36:56 UTC
Created attachment 81384 [details] [review]
largely reworked patch

The attached patch attempts to fully implement this feature. This includes saving the new compression type in the tiff-options parasite. It also only allows the new compression type to be selected if the image is monochrome.

Please try this patch and give it some testing.
Comment 9 Sven Neumann 2007-01-28 18:54:45 UTC
Created attachment 81387 [details] [review]
fixed patch

The former patch had a g_free() in the wrong spot. This patch fixes this.
Comment 10 Sven Neumann 2007-02-14 08:12:25 UTC
2007-02-14  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/tiff.c: added CCITT Group 3 and 4 compression
	schemes to TIFF save plug-in. These modes are selectable for
	indexed image with a b/w colormap only. Fixes bug #162119 with the
	help of Manfred Joerg.