Ask / Submit

[Xperia X] QML image load black [answered]

asked 2018-05-14 10:18:09 +0300

updated 2018-05-14 10:19:39 +0300


I develop several apps for SFOS and I realised while testing that the Xperia X sometimes in QML can't load some images. The Image object says that's ready but in reality a black image is shown, this doesn't happen on the Jolla 1 for example with the same app and the same images (images are loaded from the network).

What's happing

QML Image object can't load images in some cases. No error is thrown, just a black image and it appears randomly (not always the same image)

What's expected to happen

QML Image loads the image over the network asynchronous.

How to reproduce

  1. Open an app that loads a lot of images over the network, for example: Sailfinder
  2. Scroll heavily through a long list of matches or swipe some people left/right
  3. Some images are just black.
edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by Dylan Van Assche
close date 2018-05-14 11:59:21.950446


I am not sure if this is same issue but I am also experiencing a black image in QML for some images. The affected images are large images, which Sailfish OS is unable to handle/render correctly. I think on Jolla 1 you will hit this isdue for images with a size > 4096x4096.Here is my question for reference:

So did you check tge dimensions of the images if you are hitting your issue?:)

Alex ( 2018-05-14 11:48:07 +0300 )edit

The images are max 640x640. That's not the same issue... The issue is related to the Xperia X, after enforcing the QT_OPENGL_BGRA environment variable to 1 it's gone, thanks to Andrew!

Dylan Van Assche ( 2018-05-14 11:57:41 +0300 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-05-14 11:58:50 +0300

Enforcing the QT_OPENGL_BGRA environment variable to 1 fixes this issue for Sailfinder, thanks to Andrew! Normally this variable is already set but for some reason it wasn't working correctly.

edit flag offensive delete publish link more

Question tools



Asked: 2018-05-14 10:18:09 +0300

Seen: 158 times

Last updated: May 14