Thanks a lot Tor!

I wish that I'd have know that you were gonna jump right on this so quickly.
I have one more fix related to high aspect ratio images that I would have
liked to get in.  Unfortunately, I got sidetracked on something else, and
didn't get bugzilla updated with a new bug entry or my patch yet.
Fortunately, this is a relatively minor issue.  :-)


P.S. - My additional fix for app/interface.c is included below, just in case
you might want to go ahead and consider implementing it.  This fixes ignores
the size of the long axis when determining the initial display scale for
high aspect ratio images, so that they don't get displayed at ridiculously
small scales.  I have hardcoded an aspect ratio of 5 to 1 as the cutoff
point.  Ideally that would be a user preference item.

diffs in /app/interface.c, create_display_shell, near line 701, column 1 old
(-), new (+):

   gint n_width, n_height;
   gint s_width, s_height;
   gint scalesrc, scaledest;
   gint contextid;

   /*  adjust the initial scale -- so that window fits on screen */
   /*  the 75% value is the same as in gdisplay_shrink_wrap. It  */
   /*  probably should be a user-configurable option.            */
   s_width  = gdk_screen_width () * 0.75;
   s_height = gdk_screen_height () * 0.75;

   scalesrc  = SCALESRC (gdisp);
   scaledest = SCALEDEST (gdisp);

   n_width  = SCALEX (gdisp, width);
   n_height = SCALEX (gdisp, height);

   /*  Limit to the size of the screen...  */
-  while (n_width > s_width || n_height > s_height)
+  /*  2003/01/13 KAM - ignore long dimension for high aspect ratio */
+  while ((n_width  > s_width  && n_width  / 5 < n_height) ||
+         (n_height > s_height && n_height / 5 < n_width))
       if (scaledest > 1)
  if (scalesrc < 0xff)

       n_width  = width *
  (scaledest * SCREEN_XRES (gdisp)) / (scalesrc *
       n_height = height *
  (scaledest * SCREEN_XRES (gdisp)) / (scalesrc *
+ if (scaledest == 1 && scalesrc == 0xff)
+  break;

+  /* force window size limit when dimension ignored for high aspect ratio
+  if (n_width  > s_width ) n_width  = s_width;
+  if (n_height > s_height) n_height = s_height;
   gdisp->scale = (scaledest << 8) + scalesrc;

  ----- Original Message -----
  From: Tor Lillqvist
  Sent: Tuesday, January 14, 2003 9:52 PM
  Subject: [gimpwin-dev] New GIMP build available

  A frech build of GIMP 1.2.4 (pre-release) available from (The build is from today,
  despite the timestamp in that page's name.) This includes the latest
  fixes for the bugs related to very large or extreme aspect ratio
  images that Kevin Myers reported.

  Make sure to make a backup copy of your current GIMP installation
  before installing this on top of it, in case something is broken and
  you want to go back.

  Unless some big problems are reported, I'll rename that
  downloads-20030104 page into downloads.html soon, thus making it the

  The ChangeLog back to the last build for Windows (2002-09-07) is
  included below. The ChangeLog does not include some changes that I
  have made only in my local copy of the sources. The most important of
  those (as I can remember) are:

  - Display a warning when handling files or folders with non-ASCII
  characters in them. Fixing their handling completely would require
  quite lots of effort, which is better spent on GIMP 1.4.

  - Convert back and forth between the system code page and UTF-8 in
  some more places.

  This comment describes the situation regarding non-ASCII file names:

  /* On Windows, this version of GIMP uses a branch of GTK+ 1.3.0 which
  * uses UTF-8, except for two calls: gtk_file_selection_get_filename(),
  * and gtk_file_selection_set_filename(), which use the current codepage.
  * In retrospect, it might have been enough not to make GTK+ 1.3.0 use
  * Unicode on Windows, but to stick to the current codepage, similar
  * as GTK+ 1.2.x on Unix. But too late to change now. I didn't realize
  * when doing the port that GTK+ 2.0 was going totally Unicode, and
  * that I might have waited for that when I wanted Unicode support.
  * This version of GIMP just barely works with non-ASCII filenames.
  * The convention in this version of GIMP is that filenames stored and
  * passed around are in the system codepage. When retrieved from or
  * passed to GTK (other than the two APIs mentioned above) we have to
  * convert back and forth. But there are still lots of places where
  * the system codepage filenames are not converted even if they
  * sprintfed together with internationalised messages that *are* in
  * UTF-8. It's best to avoid non-ASCII filenames, sorry.
  * Tor Lillqvist, 2002-12-16

  Here's the ChangeLog:

  2003-01-14  Sven Neumann  <[EMAIL PROTECTED]>

        * app/scale.c: removed two lines which have become obsolete after
        my latest change.

        * plug-ins/perl/examples/tex-to-float (tex_string_to_pgm): applied
        a patch from Yeti <[EMAIL PROTECTED]> that makes the plug-in
        handle the output of newer versions of dvips (fixes #102435).

  2003-01-13  Manish Singh  <[EMAIL PROTECTED]>

          * Partially address #102058 with a --with-shm
          option. Defaults to sysv except on OS X, where it is none.

  2003-01-10  Sven Neumann  <[EMAIL PROTECTED]>

        * app/interface.c (create_display_shell): break out of the loop
        that calculates the initial zoom ratio in case we hit our limits.
        Seems to fix bug #103030.

        * app/scale.c (change_scale): removed a check that dates back to
        the times when we used Motif for our user interface and scrollbars
        used short values. Fixes bug #94979.

  2003-01-09  Sven Neumann  <[EMAIL PROTECTED]>

        * app/procedural_db.c (procedural_db_run_proc): always set the
        number of returned values, even in case of an error (fix merged
        from HEAD branch).

  2003-01-06  Sven Neumann  <[EMAIL PROTECTED]>

        * tools/gimp-remote.c: backported the rewritten gimp-remote from
        the HEAD branch.

  2003-01-06  Sven Neumann  <[EMAIL PROTECTED]>

        * removed incorrect copyright clauses and
        updated information about bug reporting.

  2003-01-05  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/script-fu/scripts/starscape-logo.scm: merged fix for
        bug #73894 from HEAD branch.

  2003-01-05  Sven Neumann  <[EMAIL PROTECTED]>

        * app/gimpimage.c (gimp_image_merge_layers): redid the fix for bug
        #101036 since Garry's fix introduced a crash if the flattened
        image has undo disabled. Instead of temporarily changing the layer
        mode, just use a different mode for combine_regions().

  2003-01-02  Sven Neumann  <[EMAIL PROTECTED]>

        * app/channel.c (channel_feather): pass offsets to
        channel_combine_mask() to fix bug #101731 [Fuzzy Selection with
        feather is wrong].

  2002-12-31  Garry R. Osgood <[EMAIL PROTECTED]>

        * app/gimpimage.c: Unless DISSOLVE_MODE, temporarily set bottom
        mode of composite to "Normal" in all merge types; including image
        flatten. Prevents unintended compositional arithmetic on receiving
        layer internally employed by gimp_image_merge_layers ().  Closes
        bug #101036 on gimp-1-2 branch only.

  2002-12-30  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/imagemap/imap_csim.l
        * plug-ins/imagemap/imap_csim.y
        * plug-ins/imagemap/imap_csim_parse.[ch]: merged fix for bug #97776
        from HEAD branch.

  2002-12-28  Garry R. Osgood <[EMAIL PROTECTED]>

        * app/brightness_contrast.c
        * app/color_balance.c
        * app/curves.c
        * app/hue_saturation.c
        * app/levels.c
        * app/posterize.c
        * app/threshold.c: altered tool initializers *_initialize ()
          to first query whether or not the image contains
          drawables; tool initialization does not proceed for
          empty images. Closes bug #86494 on gimp-1-2 branch only. See
        report at for details.

  2002-12-21  Garry R. Osgood <[EMAIL PROTECTED]>

        * app/gimpimage.c: fixed a buglet introduced in 2002-12-19
        check-in that affected scripts bracketing merge operations with
        "gimp-image-undo-disable"/"gimp-image-undo-enable" pairs.

  2002-12-20  Garry R. Osgood <[EMAIL PROTECTED]>

        * app/brightness_contrast.c
        * app/color_balance.c
        * app/color_balance.h
        * app/curves.c
        * app/curves.h
        * app/hue_saturation.c
        * app/hue_saturation.h
        * app/levels.c
        * app/posterize.c
        * app/threshold.c
        * app/threshold.h : fixed connect/disconnect asymmetry bug
        in my 2002-19-2002 check-in (Thanks, Mitch for pointing it out).
        See report for bug #82671 at for details.

  2002-12-19  Nathan Summers  <[EMAIL PROTECTED]>

        * app/xcf.c (xcf_save_invoker): check the return value of fclose as
        discussed on the gimp-developer mailing list.

  2002-12-19  Sven Neumann  <[EMAIL PROTECTED]>

        * app/xcf.c: unmarked most of the strings that Nathan marked for
        translation. The messages should only be triggered under very rare
        circumstances and the strings would need to be reviewed before
        marking them as translatable. We are too close to a release for
        major string changes.

  2002-12-19  Nathan Summers  <[EMAIL PROTECTED]>

        * app/xcf.c: actually check to make sure writes are successful,
        instead of unconditionally assuming that they are.  Fixes bug

  2002-12-19  Garry R. Osgood <[EMAIL PROTECTED]>

        * MAINTAINERS: updated my CV.

        * app/gimpimage.c: new GimpImage signal, LAYER_MERGE, to flag
        pending layer merges.  gimp_image_merge_layers() emits prior to
        start of undo group.

        * app/brightness_contrast.c
        * app/color_balance.c
        * app/curves.c
        * app/hue_saturation.c
        * app/levels.c
        * app/posterize.c

        * app/threshold.c: cancel callbacks connect to GimpImage
        LAYER_MERGE signals.  Closes Bug #82671; gimp crash with (1)
        active image map tools while (2) user performs a merge operation.
        See report for bug #82671 at for details.

  2002-12-17  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/perl/ changed the documentation as suggested in
        bug #84884.

  2002-12-17  Sven Neumann  <[EMAIL PROTECTED]>

        * app/main.c: don't install signal handlers for fatal signals if
        stack_trace_mode is STACK_TRACE_NEVER (fixes bug #71409).

        * plug-ins/common/jpeg.c: applied a patch from Raphael Quinet that
        changes the plug-in to not attach a parasite with default settings
        when a JPEG image is loaded (fixes bug #75398).

  2002-12-17  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/webbrowser/web-browser.scm: applied a patch from Raphael
        Quinet that removes outdated links and adds one for the GUG
        (bug #101435).

  2002-12-13  Sven Neumann  <[EMAIL PROTECTED]>

        * tools/pdbgen/pdb/drawable.pdb
        * tools/pdbgen/pdb/selection.pdb: document how to interpret the
        numbers returned for the selection bounding box. Fixes bug #96284.

        * app/drawable_cmds.c
        * app/selection_cmds.c
        * libgimp/gimpdrawable_pdb.c
        * libgimp/gimpselection_pdb.c: regenerated.

  2002-12-13  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/imagemap/imap_file.c: hide the file selection dialogs
        on "delete_event". Fixes bug #92750.

  2002-12-13  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/common/papertile.c: merged fix for bug #83971 from HEAD

  2002-12-13  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/common/tiff.c: applied a patch from Peter Kirchgessner
        that suppresses the progress bar in non-interactive mode (#97352).

  2002-12-13  Sven Neumann  <[EMAIL PROTECTED]>

        * app/gdisplay_ops.c (gdisplay_shrink_wrap): avoid to move the
        image window offscreen (#79486).

  2002-12-06  Hans Breuer  <[EMAIL PROTECTED]>

        * plug-ins/common/winclipboard.c : need to adjust the data
        pointer for BI_BITFIELDS bitmaps, fixes #99246

  2002-11-12  Sven Neumann  <[EMAIL PROTECTED]>

        * app/paint_core.c: merged fix for #91067 from HEAD branch.

  2002-11-11  Michael Natterer  <[EMAIL PROTECTED]>

        * app/gimpcontext.c (gimp_context_set_default_colors,
        gimp_context_swap_colors): don't simply crash when called with a
        NULL context but use the deafult context. Fixes this functions
        when called from the PDB. Spotted by Michael Bushey
        <[EMAIL PROTECTED]>.

  2002-11-09  Manish Singh  <[EMAIL PROTECTED]>

        * plug-ins/common/png.c: allow setting compression level 0 from
        the UI.

  2002-11-07  Dave Neary  <[EMAIL PROTECTED]>

        * plug-ins/common/xbm.c: Applied patch from Raphael
        Quinet to suppress printing of comments in XBM files.
        Closes bug #82763.

  2002-11-07  Dave Neary  <[EMAIL PROTECTED]>

        * help/C/images/brush_dialog.png
        * help/C/dialogs/brush_selection.html: Applied patch from
        Cameron Gregory <[EMAIL PROTECTED]> to add missing help
        file. Closes bug #92377.

  2002-11-06  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/common/png.c: applied patch from Raphael Quinet that
        untoggles the "Save background color" option for images w/o an
        alpha channel (#92395).

  2002-10-29  Dave Neary  <[EMAIL PROTECTED]>

        * plug-ins/common/png.c: Back-ported patch from HEAD to
        close bug #55700.

  2002-10-29  Manish Singh  <[EMAIL PROTECTED]>

        * strip paths from the plug-in filename for
        installation (fixes #97111).

  2002-10-22  Tor Lillqvist  <[EMAIL PROTECTED]>

        * app/ Add rule to produce gimp.def from gimp.sym. Had
        been left out by mistake. Add rule to mv gimp-1.2.exe gimp.exe.

        * config.h.win32: Define HAVE_BIND_TEXTDOMAIN_CODESET (which is
        essential on Win32 builds to get working i18n with a libintl that
        otherwise converts to some codepage. Also define HAVE_GETTEXT even
        if that isn't checked in any file. Define HAVE_WINSOCK_H. Add some
        #undefs from a current configure-generated config.h for
        completeness' sake.

        * app/main.c (main)
        * app/plug_in.c (plug_in_make_menu)
        * libgimp/stdplugins-intl.h: If on Win32, call
        bind_textdomain_codeset() to get messages from gettext in UTF-8,
        which is what the GTK+ 1.3.0 used on Win32 wants.

        * app/plug_in.c (plug_in_close): Move a variable inside #ifndef
        (xspawnv): Remove a couple of leftover unused variables.

  2002-10-16  Tor Lillqvist  <[EMAIL PROTECTED]>

        * (find_out_env_flags): Fixes for
        --msvc-syntax handling. Don't try to use configure-time CFLAGS and
        LDFLAGS intended for gcc if we are asked to do --msvc-syntax.

        * (EXTRA_DIST): Add gimptool-win32.c and .in. No rules
        to build gimptool-win32.exe on Windows, would require some
        automake acrobatics that I am too tired to attempt now.

  2002-10-08  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/common/ps.c: applied a patch from Peter Kirchgessner
        that fixes bug #78310 (wrong bounding box when exporting to EPS).

  2002-09-26  Jacob Berkman  <[EMAIL PROTECTED]>

        * modules/ (CPPFLAGS): rename to AM_CPPFLAGS

  2002-09-24  Michael Natterer  <[EMAIL PROTECTED]>

        * app/channel.c (channel_sharpen): ported fix for #93853 from HEAD.

  2002-09-18  Manish Singh  <[EMAIL PROTECTED]>

        * plug-ins/dbbrowser/dbbrowser_utils.c: Allow activation of the
        search from the entry field.

  2002-09-16  Hans Breuer  <[EMAIL PROTECTED]>

        * app/makefile.msc libgimp/makefile.msc
          plug-ins/makefile.msc modules/makefile.msc :
        Updated to allow building Gimp 1.2.x with msvc using
        the same libraries as the mingw build does.

        * app/user_install.c : #ifdef G_OS_WIN32 get the
        definitions of S_ISDIR and S_ISREG

        * libgimp/gimp.def libgimp/gimpui.def : exported more
        non underscored functions (shoud be almost complete now)

        * plug-ins/gflare/gflare.c : include <gtk/gtk.h> before
        relying on G_OS_* being defined

        * plug-ins/twain/twain.c : implement main() to allow to
        build as console app as well.

  2002-09-10  Sven Neumann  <[EMAIL PROTECTED]>

        * plug-ins/common/gz.c (load_image): don't call gimp_temp_name()
        with (NULL + 1) if find_extension() failed.


        Yahoo! Groups Sponsor

  To Post a message, send it to:   [EMAIL PROTECTED]
  To Unsubscribe, send a blank message to:

  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Gimp-developer mailing list

Reply via email to