Announcement

Collapse
No announcement yet.

Incorrect calculation of windows space in Windows 10

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Forwarded Incorrect calculation of windows space in Windows 10

    IrfanView 64-bit v4.58.
    I just migrated to windows 10 which has thinner window borders, but Irfanview doesn't recognize it and leaves extra room around the window to accommodate the older versions of Windows. (See the attached picture)
    This issue is relevant to View -> Display options (Window mode) all options containing the word desktop. The screenshots I provided are for "Fit only big images to desktop" and "Fit small image side to desktop" respectively

    #2
    Confirmed. Send a bug report to Irfan Skiljan.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      To fit images to the desktop without thick borders, you may maximize the window and select to fit images to the window.
      My system: IrfanView 4.62 64bit, Windows 10 22H2, Intel Core i5-3570, 16GB RAM, NVidia GTX 1050Ti 4GB

      Comment


        #4
        Originally posted by Bhikkhu Pesala View Post
        Confirmed. Send a bug report to Irfan Skiljan.
        I think this is not a bug, rather it's a quirk of Windows 10. The thin border of a window is only visual, there's also a thicker invisible border on the sides and the bottom of the window.

        My system: IrfanView 4.62 64bit, Windows 10 22H2, Intel Core i5-3570, 16GB RAM, NVidia GTX 1050Ti 4GB

        Comment


          #5
          Originally posted by JendaLinda View Post
          I think this is not a bug, rather it's a quirk of Windows 10. The thin border of a window is only visual, there's also a thicker invisible border on the sides and the bottom of the window.
          IMO the "thicker invisible border" serves only for users to be able to easily grab on the border with a cursor and resize it... If you grab the top/bottom of a window and drag it all the way to the desktop border to maximize window height, there's no "invisible border" left after the resizing.

          Comment


            #6
            When I take a screenshot of the IrfanView window it is 7 pixels less than the height of my monitor(s).
            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

            Comment


              #7
              Let's ask Irfan Skiljan, what he will say about this.

              I did a quick investigation. A program window has four dimension properties - Width, Height, Client Width and Client Height. Width and Height are dimensions of the whole window including the border, the invisible border and the window title. The client dimensions are the area the application can use. In my testing the Width is 16 pixels more then the Client Width, so the real size of the border is 8 pixels. Also, if I move the window to the 0, 0 coordinates, there's a visible gap on the left side.

              Taking a screenshot doesn't include the invisible border. I guess the screenshot feature is implemented in the Windows graphics interface itself, so it can save only the rendered area of the window. However, it seems programs don't have access to the size of the thin border.
              My system: IrfanView 4.62 64bit, Windows 10 22H2, Intel Core i5-3570, 16GB RAM, NVidia GTX 1050Ti 4GB

              Comment


                #8
                Originally posted by JendaLinda View Post
                To fit images to the desktop without thick borders, you may maximize the window and select to fit images to the window.
                Today I discovered even the maximized window is bugged. I rarely ever use IrfanView like that and didn't even think of checking it before. Instead of having room left around the window, it leaves room inside the window around the picture. You have to select the whole image and zoom in on it if you want it to fill the maximum possible space.
                I'm attaching screenshots of how Irfan does it (bug irfan W10 3.jpg) and how it looks after I zoomed in manually (bug irfan W10 4.jpg).

                Originally posted by Bhikkhu Pesala View Post
                Confirmed. Send a bug report to Irfan Skiljan.
                I tried to send an e-mail to irfanview@gmx.net with the description, screenshots, and a link to this thread and got no reply so far. Should I expect one? I assume that's what you've meant by "Send a bug report to Irfan Skiljan."
                Attached Files

                Comment


                  #9
                  Yes, there is an unnecessary border around the picture when "Fit only big images to desktop" is selected. That is probably a bug.
                  If you select "Fit only big images to window", there is no border inside the window.

                  Irfan Skiljan will answer the e-mail eventually. Please be patient.
                  My system: IrfanView 4.62 64bit, Windows 10 22H2, Intel Core i5-3570, 16GB RAM, NVidia GTX 1050Ti 4GB

                  Comment


                    #10
                    Originally posted by JendaLinda View Post
                    Yes, there is an unnecessary border around the picture when "Fit only big images to desktop" is selected. That is probably a bug.
                    If you select "Fit only big images to window", there is no border inside the window.
                    On the other hand, when I select "fit only big images" and the window is not maximized, the border inside the window is still there, but only on top and bottom... This is all result of the same issue, the difference is only in how the room for the different window modes is calculated.
                    Originally posted by JendaLinda View Post
                    Irfan Skiljan will answer the e-mail eventually. Please be patient.
                    OK, thank you.
                    Attached Files

                    Comment


                      #11
                      I'm not sure I understand the problem described above, so let me approach (and share) my original Q from a different direction.

                      I became puzzled (and aggravated) that usually, Irfanview would put a gray border, roughly 1/8 inch (about 3 mm) thick, all the way around any picture it displayed; but, at other times (which I could not control, or figure out), that border would disappear, entirely.

                      That became a problem, since I wanted to be able to crop some all-time favorite pics, in ways that would totally and entirely fill my monitor screen, with no border; and, I could not do that, when a border was there, since the border has a consistent thickness, all the way around the screen, while my screen has (standard) 16x9 resolution.

                      After seeing some hints here, and after trying a few more things, I realized that the border will disappear, if and only if:
                      (1) when I first load Irfanview, and have it display a picture, I MUST maximize the Irfanview window, so that it will fill my entire screen, without the gray border that Windows 10 inserts, whenever some window is NOT fully maximized, to fill the entire screen; and,
                      (2) then, AFTER I have fully maximized Irfanview, in Windows 10, THAT is when I use the options in the "View" pulldown menu, to:
                      (a) hide the caption bar (Alt-Shift-C), and then,
                      (b) hide the menu bar (Alt-Shift-M)

                      I've got no idea whether that is what you folks have been discussing, back and forth, in this thread;
                      but, having figured out that trick, I wanted to share it, in case it might also help solve the problem/question/complaint that a user raised, above.

                      Comment


                        #12
                        Some background technical info on this topic:
                        by way of http://www.brianapps.net/sizer4/moredetails.html (yes it is http)
                        • The GetWindowRect API call returns the size and position of a window. This can be used for all versions of Windows. Up until Windows 10, this was the size users actually see on screen.
                        • The Desktop Window Manager, introduced with Vista, supports effects like border shadows and transparency. Win10 now uses a few pixels (typically 7) for border effects, so the size you get from the API call is bigger than the actual window.
                        Please post more on this if you can.

                        The border ist typically 7 pixels, but for modal windows (e.g. the small window for settings in programs) I get less, often 3. So it varies.

                        BTW the Sizer v.4 should be able to remove this border for screenshots.
                        As described at the link above (the setting mentioned is default).
                        But… it didn't work for me (possibly as I'm stuck on W10 1609?).
                        Stuck on Win10…

                        Comment

                        Working...
                        X