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 555493 - Zoom 1:1 scrolls partly off image
Zoom 1:1 scrolls partly off image
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: General
git master
Other All
: Normal minor
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-10-08 05:01 UTC by Akkana Peck
Modified: 2018-05-24 12:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot after typing 1 to zoom to full size (178.34 KB, image/jpeg)
2008-10-08 05:02 UTC, Akkana Peck
  Details
Original image (527.75 KB, image/jpeg)
2008-10-14 21:59 UTC, Akkana Peck
  Details
force-center-after-shrink-wrap-needswork-2008-10-18.patch (3.08 KB, patch)
2008-10-18 07:15 UTC, Martin Nordholts
needs-work Details | Review

Description Akkana Peck 2008-10-08 05:01:27 UTC
Please describe the problem:
When enlarging a large but recently cropped image to 1:1 (using the 1 keyboard shortcut), the zoomed image is presented scrolled part-way out of the window, instead of showing as much of the image as possible.

Steps to reproduce:
1. Load a large image that's way too big to fit on screen (e.g. 4272x2848). It will load at a very much reduced zoom (18.2% here on a 1280x1024 monitor).
2. Use the Crop tool to crop a piece out of the center of the image, but one large enough that gimp still wouldn't show it at 100% zoom (for instance, 936x974 will do it for this monitor size). Note that GIMP retains the same 18.2% zoom, so now the image window is quite small.
3. Type 1 (numeral one) in the image window to zoom to full 1:1 size. Now you have a window showing part of the full-size image, with scrollbars, only it's scrolled off the bottom or right edge of the image, so you see less of the image than you ought to see at that size.


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Akkana Peck 2008-10-08 05:02:46 UTC
Created attachment 120178 [details]
screenshot after typing 1 to zoom to full size
Comment 2 Martin Nordholts 2008-10-08 05:32:16 UTC
Thanks for taking the time to report this bug.
This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. You may want to check for a software upgrade.


*** This bug has been marked as a duplicate of 553534 ***
Comment 3 Akkana Peck 2008-10-14 21:33:06 UTC
I'm still seeing this, with a trunk build updated this morning. Martin says it's probably from a different cause since the other case was fixed, so I'm reopening this one rather than the other bug. I'll attach a test image and repeatability instructions.
Comment 4 Akkana Peck 2008-10-14 21:59:44 UTC
Created attachment 120606 [details]
Original image

Load this image into gimp. I am at 1280x1050, and gimp displays the image in a 818x618 window. I have "Resize window on zoom" and "Resize window on image size change" both set in Preferences/Image Windows.

With the crop tool, choose a crop rect starting at 0,1062 of size 1337x1144 (I didn't make that width intentionally, it's just the size I dragged with the cursor). Adjust the values in tool options if necessary. (Actually it doesn't seem to matter if they're a few pixels off.) Click inside the rectangle to crop.

Now you have a tiny postage stamp sized window. Move the mouse into it (I usually end up a little right and down from center) and type numeral 1 to zoom.

I get, repeatably, a window that's scrolled off the right end of the image: in other words, the cropped image stops at 1337 but the ruler at the top of the window goes to about 1450. The first time, I also got some extra at the bottom of the window, but not on repeats (see next paragraph).

On repeating, it's a little different. Ctrl-Z to undo, Ctrl-shift-E to size back down (window ends up at 970x717 and 21.7%, not the original 818x618 at 18.2%), I get extra width on the right side of the window but nothing extra on the bottom.
Comment 5 Martin Nordholts 2008-10-15 05:36:46 UTC
You really should have said from the start that you had Resize window on zoom/resize enabled. I'm able to reproduce this now.
Comment 6 Martin Nordholts 2008-10-18 07:15:32 UTC
Created attachment 120825 [details] [review]
force-center-after-shrink-wrap-needswork-2008-10-18.patch

This patch fixes the issue but it still needs some work. The tricky part is interacting with the window manager (see the TODO in the patch). Not sure yet how to solve this.
Comment 7 airfullbete 2008-11-23 19:12:05 UTC
With

1) svn revision 27671 and
2) "Resize window on zoom" and "Resize window on image size change" both set in Preferences/Image Windows

everytime i zoom in or out (with -/+) the image is recentered. This is very inconvenient. Is this behavior related to the current bug or should i fill another bug report?

AB.
Comment 8 Martin Nordholts 2008-11-23 19:16:51 UTC
This is a bug report, not a discussion forum. Please move this to gimp-developer if you have more comments.

That's not a bug but a design choice. I don't really see any other reasonable behavior (if I understand your step-by-step correctly).
Comment 9 Akkana Peck 2009-05-09 16:33:32 UTC
Another case where gimp 2.6 scrolls partly off the image, not at 1:1 scroll (let me know if I should open a new bug, but I'm guessing it's ultimately the same problem):
 - Open a vertical format photo, 1600x1200
 - Image->Transform->Rotate 90 degrees
The image is rotated but will be scrolled up so that the top part isn't visible and there's empty space in the image window below the visible parts of the image.

This happens repeatably for me, on displays where the image is zoomed to either 33% or 50%. Unfortunately Rotate 90 degrees is something I show when I give GIMP talks and can't really avoid showing, so audiences see the bug too.
Comment 10 Michael Natterer 2012-01-08 21:20:59 UTC
Does this happen in 2.7 too?
Comment 11 Akkana Peck 2012-02-11 22:14:53 UTC
Yes! Sorry for the delay -- the problem may be sensitive to monitor resolution, and I couldn't reproduce it reliably using the instructions I'd used before. But I have instructions now that demonstrate the bug repeatably at 1680x1050, in both 2.6 and 2.7:

- Open a 3648 x 2736 image (10Mp camera image). Image displays at 25% zoom.
- In the Crop tool chose a region starting at around (1400, 600) and of size around 1400 x 1000. Click to crop.
- Type 1 to zoom to 100%. GIMP zooms but scrolls the resulting image to leave blank space at the bottom of the window.

You'll probably need "Resize image on zoom" and/or "Resize image on size changed" checked (I have both) in Image Windows prefs.
Comment 12 Michael Natterer 2012-02-12 20:28:56 UTC
2.6 -> 2.8
Comment 13 Michael Natterer 2016-01-11 01:02:01 UTC
After all the zoom changes, does this still happen in master?
Comment 14 Akkana Peck 2016-01-11 02:48:50 UTC
Still happens (darn!)
Comment 15 Michael Natterer 2016-01-11 23:00:46 UTC
I don't know exactly how to reproduce this. Is cropping the image
really needed? This bug sounds a bit over-specified to me.
Comment 16 Akkana Peck 2016-01-12 01:49:44 UTC
I know it does, but unfortunately, cropping may matter. I can't seem to reproduce it by just opening an image. If I follow the instructions I listed -- crop to 935x974 -- and press 1, I see the bug; if I then export that file, close the image and open the file I just exported, and press 1, the bug doesn't happen.

And it doesn't happen at all sizes: I just cropped the same original large image to 1300x940 and it didn't happen. The vertical size seems to be the important one (the image is scrolled vertically but not horizontally) so I bisected the sizes where it happens: I don't see any scroll if I crop to height 1150, but I think I see a one-pixel scroll error at 1149, and as I decrease the values down through the high 900s the error becomes more pronounced.

On the low end, if I crop to 961 or less before typing 1, I see the image full size, no scrollbars (on this 1680x1050 monitor). But at 962 or larger, when I hit 1 GIMP makes the window considerably smaller, and I see scrollbars and a big gap at the bottom where there's no image. But again, if I save that cropped image, close the window and reload it (comes up at 66%) then hit 1, the scroll is fine, no bug.

So it looks like I have to start with a larger image to see the bug, and the best way to test it is to crop to just barely larger than whatever size GIMP uses as its maximum allowable vertical percentage of the screen.

In the horizontal direction, if I make the image 1644 pixels, when I hit 1 GIMP will show it to me in a window 1679 pixels wide; but if I crop the image to 1645 wide, GIMP scales the window down to 1268 wide and scrolls it wrong, so I see the blank space again.

So you should be able to test this on either axis by cropping the image to just slightly over (your monitor size) - (size of your window decorations plus GIMP's image window UI), then zooming to 1. Why it should matter whether it's been cropped first is a mystery.
Comment 17 GNOME Infrastructure Team 2018-05-24 12:24:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/280.