Skip to content

Huge image display issue #772

Closed
Closed

Description

@terrancewong

ISSUE TYPE

  • Bug Report

GEEQIE VERSION

Repository     : openSUSE-Tumbleweed-Oss
Name           : geeqie
Version        : 1.5.1-2.1
Arch           : x86_64
Vendor         : openSUSE

OS / DISTRIBUTION

  • Description: openSUSE Tumbleweed
  • Release: 20200528

SUMMARY

Large image display at 1:1 has issue. zoomed 1:1.05 or 1.05:1 looks normal.

Same for tif and jpeg

STEPS TO REPRODUCE

  • screenshots

1:1.05

1.05:1

1:1

Activity

  1. caclark commented on Jun 3, 2020

    @caclark
    Collaborator

    I installed openSUSE-Tumbleweed and geeqie 1.5.1-2.1, but did not see the problem.
    Could you give a link to an image which shows this effect?

  2. terrancewong commented on Jun 3, 2020

    @terrancewong
    Author

    seems happen when image dimension > 32768.

  3. terrancewong commented on Jun 3, 2020

    @terrancewong
    Author

    You can make one using imagemagick

    convert -size 38400x2400 tile:/usr/share/wallpapers/openSUSEdefault/contents/images/3840x2400.jpg result.jpg
    
  4. caclark commented on Jun 4, 2020

    @caclark
    Collaborator

    OK, I can replicate the problem on openSUSE, but not on my normal system.
    It may take a while to find the problem.

  5. fidergo-stephane-gourichon commented on Jul 24, 2020

    @fidergo-stephane-gourichon

    I can reproduce the problem on Xubuntu 20.04 running plain geeqie package.

    Had a random picture and used convert command line above to tile it to 38400 pixels wide.

    Indeed pressing "z" for 1:1 shows the problem. Changing to any other zoom ratio (even nearly 1:1) and the problem no longer shows. I guess there is a different code path for the 1:1 case?

  6. fidergo-stephane-gourichon commented on Jul 24, 2020

    @fidergo-stephane-gourichon

    32767x1079 -> no issue
    32768x1079 -> reproduced
    1919x38400 -> no issue
    1919x65500 -> no issue

    Better title: "images 32768 pixels wide or more get pixelated when shown 1:1"

  7. caclark commented on Jul 24, 2020

    @caclark
    Collaborator

    I normally use Xubuntu.
    Without GPU accel. the problem exists.
    With GPU accel. there is no problem.

    I suppose that is a fractional advance in knowledge of the problem. It will still take some time, I guess...

  8. terrancewong commented on Jul 26, 2020

    @terrancewong
    Author

    FYI the chunk width is 128 pixels, seems related to

    src/renderer-tiles.c:63:#define PR_TILE_SIZE 128
    

    nope!

    also src/renderer-tiles.c, replace

           gdk_pixbuf_copy_area(src,
                   -offset_x + pb_x, -offset_y + pb_y,
                   pb_w, pb_h,
                    dest, 
                   pb_x, pb_y);
           }
    

    with

           gdk_pixbuf_scale(src, dest,
                pb_x, pb_y, pb_w, pb_h,
                offset_x, 
                offset_y, 
                scale_x, scale_y,
                interp_type);
           }
    

    it looks normal now.

    buggy gdk_pixbuf_copy_area ?
    but it's very strange in [https://github.com/GNOME/gdk-pixbuf/blob/master/gdk-pixbuf/gdk-pixbuf-util.c]
    gdk_pixbuf_copy_area is just a wrapper of gdk_pixbuf_scale. "Latest commit afb4f77 on Sep 11, 2015"

    I'm so confused!

  9. terrancewong commented on Jul 26, 2020

    @terrancewong
    Author

    confirmed, I wrote a replacement of gdk_pixbuf_copy_area, this one works fine. should submit a bug to OpenSuSE

    1303       // quick & dirty replace
    1304       int srs = gdk_pixbuf_get_rowstride (src);
    1305       int drs = gdk_pixbuf_get_rowstride (dest);
    1306       guchar *psrc = gdk_pixbuf_get_pixels (src);
    1307       guchar *pdst = gdk_pixbuf_get_pixels (dest);
    1308       printf("copy %016x to %016x", (size_t)psrc, (size_t)pdst);
    1309       for(int y = 0; y < pb_h; y++)
    1310         {
    1311         for(int x = 0; x < pb_w; x++)
    1312           {
    1313           for (int c = 0; c < 3; c++) 
    1314             pdst[(y * drs) + x*3 + c] = psrc[(-(int)offset_y + pb_y + y) * srs + (-(int)offset_x + pb_x+x)*3 + c];
    1315           }
    1316         }
    
    
  10. caclark commented on Jul 26, 2020

    @caclark
    Collaborator

    The computer I use for this died yesterday, and it may be a few days before I look at it again.
    Just before the system failed I concluded that the problem originated with commit 0dfeec9 (2015-08-11).

  11. added a commit that references this issue on Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions