[Gimp-developer] Initial Window Size Limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

I'm running gimp 1.2.4, and working on some very large images with extremely
high aspect ratios (i.e. length is MUCH longer than width).  Over the past
few months I have had several problems related to bugs in the code that the
gimp was using to set the initial display scale with my images.
Fortunately, Sven Neumann and others recently diagnosed and corrected most
of these problems.

Additionally, I've made one further extremely simple patch to my own copy of
the gimp.  This patch causes the gimp to ignore the length of the long axis
when determining the initial display scale, IF the aspect ratio of the image
exceeds a cutoff value (I'm presently using 5:1 for the cutoff).  This patch
makes it MUCH easier and faster to work with my images, by avoiding the
excessive amount of time that is otherwise required to zoom in to a
reasonable scale.  FWIW, aspect ratios on my images are typically on the
order of 100:1.

The preceding patch mostly does what I want, but it still has one slight
deficiency.  When a high aspect ratio image ratio is displayed, the gimp is
setting the window size for the long image dimension to a value that appears
to be just slightly larger than the actual screen size, and making the image
scrollable in that dimension.  Since the window generally does not initially
appear centered on the screen, this means that the first step I must take
when working with my images is now to move and resize the window.
Admittedly that isn't a severe problem, but I work with a lot of images, and
any additional steps that I can avoid add up to a lot of time in the long
run.

So, what I would like to do is alter the gimp's behavior slightly when
determining the window size for an image which is scaled such that it
exceeds the screen size.  Rather than set the window size equal to the
screen size in any dimension for which the screen size has been exceeded, I
would like to set the window size to something like 80 percent of the screen
size.  Note that the result of the original image scaling routine is to set
the image scale such that the window size is approximately 75 to 80 percent
of screen size, and I would like to size the window similarly even if the
image size exceeds the screen size.

Can someone please point me to the location of the gimp's code that
determines what window size to use when the scaled image won't fit on the
screen?  I'm guessing that a very simple patch to that code should make the
gimp do exactly what I want.

Any help would be greatly appreciated.  Thanks in advance!

s/KAM

P.S. - Once I get these patches completed, I plan to submit them for
permanent incorporation into the gimp.  They would be very useful for anyone
else who works with high aspect ratio images.



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux