REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 3.3.0.16
HARDWARE (Jolla1, Tablet, XA2,…): jolla 1
UI LANGUAGE: english
REGRESSION: (compared to previous public release: Yes, No, ?): bug not present on 3.2.1.20
The image/texture size is limited by the hardware and software. The Qt macro GL_MAX_TEXTURE_SIZE is intended to determine this limit but this seems to be not working on Sailfish OS (at least when I tested it back in 2018) and nobody was able to provide a solution in the TJC thread.
I still would like to know a proper solution for this. Such issues are just the reason why there are no proper apps being developed for SFOS.
That`s interesting. Thank you! And the problem is somewhat more complex. As a ‘workaround’ I implemented an separate page to show images zoom-able and pitch-able, in contrast of showing the image between the chat text. On this separate page, the image is showing as expected. If the size limit triggers the bug you mentioned, it should not be shown on that separate page either? Or did I understand something wrong here?
Well it also could be another issue, maybe a bug of the corresponding QML component, I am just guessing here. But I had the same issue with the Jolla1 (back in 2018/2019) of pictures not being displayed… Nevertheless, the fact that it is working on other devices imply that it can not be a QML bug since all devices should have the same code base (at least in regards of the UI/QML components).
Does this issue occur just with big sized images or also with smaller ones?
It also could be a RAM issue, since the Jolla1 has limited memory (dependent of the internal implementation) that could mean that each process also receives a smaller memory chunk than on other devices.
Indeed, smaller pictures are getting displayed without a problem. So maybe it’s a combination of the bug and a RAM issue. The only real workaround here is to create and display thumbnails in the preview and displaying the full picture on a separate page.
Are you caching the pictures on the internal memory or are you just assigning the image URL to the QML component’s source property?
You could try whether caching the media files will workaround this issue.
change “import QtQuick 2.0” to “import QtQuick 2.6”
adjust some properties in Image {
id: […]
source: […]
width: […]
height: […] cache: false // useful when quickly change or load an image fillMode: Image.PreserveAspectFit // always keeps aspect ratio when resizing autoTransform: true // respect EXIF tags on rotation, useful for images taken with cameras sourceSize.width: (sourceSize.width > 1920) ? 1920 : sourceSize.width // limit the loaded image’s memory footprint size regardless of original size: IF sourceSize.width > 1920 pixels THEN set sourceSize.width to 1920 pixels ELSE just keep original sourceSize.width pixels sourceSize.height: (sourceSize.height > 1080) ? 1080 : sourceSize.height // or use same value as width -> 1920 pixels
}