RSS/Atom feed Twitter
Site is read-only, email is disabled

saving multi-page TIFF files [was: tiff save dialog cosmetic fix]

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

tiff save dialog cosmetic fix Brion Vibber 11 Jul 10:10
  tiff save dialog cosmetic fix Dov Grobgeld 11 Jul 10:25
   tiff save dialog cosmetic fix Sven Neumann 12 Jul 09:26
   saving multi-page TIFF files [was: tiff save dialog cosmetic fix] Sven Neumann 12 Jul 12:13
  tiff save dialog cosmetic fix Sven Neumann 12 Jul 09:42
Brion Vibber
2004-07-11 10:10:36 UTC (almost 20 years ago)

tiff save dialog cosmetic fix

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

While I was playing with the tiff plugin, I fixed it to disable the 'Save color values from transparent pixels' box when saving an image with no alpha channel, as the png plugin does. The option has no effect without alpha.

Patch attached.

- -- brion vibber (brion @ pobox.com) -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA8PX7wRnhpk1wk44RAmzeAKCYtsM7Bvuv8HIAqLIgL90yuta1hgCfdw/x cbyYmGinGoJEAiA7myJuwkk=
=FVV4
-----END PGP SIGNATURE-----

--- gimp/plug-ins/common/tiff.c-cmyk 2004-07-10 23:21:01.000000000 -0700 +++ gimp/plug-ins/common/tiff.c 2004-07-11 01:06:45.000000000 -0700 @@ -142,7 +142,7 @@
gint32 drawable, gint32 orig_image);
-static gboolean save_dialog (void); +static gboolean save_dialog (gboolean alpha);
static void comment_entry_callback (GtkWidget *widget, gpointer data); @@ -354,7 +354,7 @@
gimp_parasite_free (parasite);
/* First acquire information with a dialog */ - if (! save_dialog ())
+ if (! save_dialog (gimp_drawable_has_alpha (drawable))) status = GIMP_PDB_CANCEL; break;

@@ -2082,7 +2082,7 @@
}

static gboolean
-save_dialog (void)
+save_dialog (gboolean alpha)
{
GtkWidget *dlg;
GtkWidget *vbox;
@@ -2126,7 +2126,8 @@
toggle = gtk_check_button_new_with_mnemonic ( _("Save _color values from transparent pixels")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), - tsvals.save_transp_pixels); + alpha && tsvals.save_transp_pixels); + gtk_widget_set_sensitive (toggle, alpha); gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0); gtk_widget_show (toggle);

Dov Grobgeld
2004-07-11 10:25:15 UTC (almost 20 years ago)

tiff save dialog cosmetic fix

Speaking of tiff files, is there any particular reason why the tiff plug-in doesn't support saving multiple layers as tiff pages, or is it just that noone has got around to implementing it?

Regards, Dov

Sven Neumann
2004-07-12 09:26:15 UTC (almost 20 years ago)

tiff save dialog cosmetic fix

Hi,

Dov Grobgeld writes:

Speaking of tiff files, is there any particular reason why the tiff plug-in doesn't support saving multiple layers as tiff pages, or is it just that noone has got around to implementing it?

Before you even think about doing any changes to the TIFF plug-in, can we please at least consider to switch to the TIFF plug-in written by Kai-Uwe Behrmann. We didn't do this for 2.0 because it was proposed too late but now would be a good time for it.

Sven

Sven Neumann
2004-07-12 09:42:26 UTC (almost 20 years ago)

tiff save dialog cosmetic fix

Hi,

Brion Vibber writes:

While I was playing with the tiff plugin, I fixed it to disable the 'Save color values from transparent pixels' box when saving an image with no alpha channel, as the png plugin does. The option has no effect without alpha.

Thanks. I've applied your patch to both branches. We prefer patches to go to bugzilla though, simply because they might be forgotten otherwise.

Sven

Sven Neumann
2004-07-12 12:13:39 UTC (almost 20 years ago)

saving multi-page TIFF files [was: tiff save dialog cosmetic fix]

Hi,

Dov Grobgeld writes:

Speaking of tiff files, is there any particular reason why the tiff plug-in doesn't support saving multiple layers as tiff pages

It may be a misunderstanding of the TIFF format but I don't think that GIMP layers map very well to TIFF pages. If we would make the TIFF plug-in save layers as pages, that would be rather confusing and a lot of users will end up with multi-page TIFF files they never intended to create. IMO multiple pages in TIFF files are a rather obscure feature that should be left for FAX applications.

Sven