Bug 335822 - zooming on large image result in a black box
Summary: zooming on large image result in a black box
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Android client (show other bugs)
Version: GIT master
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Jesper Pedersen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-05 07:12 UTC by Jesper Pedersen
Modified: 2020-04-28 22:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch imlpementing johannes solution (1.90 KB, application/octet-stream)
2014-06-05 07:12 UTC, Jesper Pedersen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Pedersen 2014-06-05 07:12:57 UTC
Created attachment 87019 [details]
Patch imlpementing johannes solution

When you start zooming on the android client, the full image is sent over (This is a featrure to allow that you have a better resolution during zooming, while are fast during browsing). However, if the image is huge, then the image is not correctly loaded and instead it turns black. I've no idea what the exact limitation is, but it seems to depend on the device and be a limitation in OpenGL.

I don't see any error message in Qt code, only this line on stdout:
W/Adreno-ES20(13539): <core_glTexImage2D:514>: GL_INVALID_VALUE

Johannes Zarl analyzed the situation and came up with this report:
I've programatically created a batch of different resolution images to get 
some size-tag for the black-image-problem, but I'm not really getting a sharp 
conclusion:

I used the following command to create images for my test:

for dim in {5000..20000..1000} ; do \
  convert rose: -resize ${dim}x${dim}\! \
    /tmp/kphotoalbum-demo-zing/test-$dim.jpg \
;done

The biggest possible size was 6214x6214; the next one (6125x6125) did not 
work. 6124 squared corresponds to 37.5 MP

To me, this indicates:
 - The problem is not related to raw file size (not surprising, given that you 
said it's coming from somewhere within the OpenGL stack).

Not using square images changes the observed behaviour:

convert rose: -resize 8192x1024! pan-8192x1024.jpg
convert rose: -resize 8192x1024! pan-8193x1024.jpg

Produces two images, where the first one works, the second one (and bigger 
ones) not. This gives a image size of 8.3 MP. Interesting about that number is 
that 8192 = 2 * 4096.

I'm not entirely sure how to best determine when to split. In my own 
collection I've got one image with 8114x2731 pixels that works and a 8204x4795  
that doesn't work. So that seems to be consistent with my findings.

I don't really have that much time to do further testing for now, but I could 
imagine that there's actually two limiting factors: maximum pixel count 
(6124^2) and maximum dimension (8192).

Do you know how to get information about the graphics hardware in a tablet? It 
would be interesting to get something like maximum texture size and compare 
the value with my findings...


However, on my cell phone the limitation seems to be different, since I black out way earlier than with an image of the sizes he describes. 

Attached is a patch which limits the dimentions according to Johannes description. It does however, not work on my cell as mentioned.
Comment 1 Andrew Crouthamel 2018-11-11 04:29:18 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Andrew Crouthamel 2018-11-21 04:21:15 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Johannes Zarl-Zierl 2020-04-28 22:58:57 UTC
Closing all android bugs for the time being. Reopen if somebody can work on it again.