Black backround image -CrossFadeImage does not set the sourceSize for the images

Bug #1227783 reported by Günter Schwann
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Critical
Tim Peeters
ubuntu-system-settings (Ubuntu)
Invalid
Undecided
Unassigned
Saucy
Invalid
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Critical
Tim Peeters
Saucy
Fix Released
Critical
Tim Peeters
unity8 (Ubuntu)
Fix Released
Undecided
Michael Zanetti
Saucy
Fix Released
Undecided
Unassigned

Bug Description

Since image 20130918 it's possible to set the background image in the settings app.
There one can see a preview of the image using a CrossFadeImage component
When selecting a new image from the gallery-app that exceeds the max GL texture size (2048 on maguro for example), the image is black. If the sourceSize would be set, the image would be visible and less resouces would be used.

The unity8 shell uses a copy of that component (and will maybe move to the SDK one) and has the same issue.

Related branches

description: updated
Bill Filler (bfiller)
summary: - CrossFadeImage does not set the sourceSize for the images
+ Black backround image -CrossFadeImage does not set the sourceSize for
+ the images
Changed in ubuntu-ui-toolkit (Ubuntu Saucy):
assignee: nobody → Tim Peeters (tpeeters)
importance: Undecided → High
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu Saucy):
importance: High → Critical
Revision history for this message
Tim Peeters (tpeeters) wrote :

is there a small test program to reproduce the issue?

Changed in ubuntu-ui-toolkit:
assignee: nobody → Tim Peeters (tpeeters)
importance: Undecided → Critical
Revision history for this message
Tim Peeters (tpeeters) wrote :

I wrote a small test-program (it does not reproduce the bug on my laptop, perhaps the images are too small):

import QtQuick 2.0
import Ubuntu.Components 0.1

Rectangle {
    color: "green"
    width: 600
    height: 600

    CrossFadeImage {
        id: crossFader
        anchors {
            fill: parent
            margins: 20
        }
        source: "/home/tim/Pictures/IMG_7001.jpg"

        MouseArea {
            anchors.fill: parent
            onClicked: crossFader.source = "/home/tim/Pictures/IMG_7003.jpg"
        }
    }
}

Revision history for this message
Tim Peeters (tpeeters) wrote :

ok if I replace in the eabove the IMG_7001.jpg and IMG_7003.jpg with two 10.000*10.000 images (single color, created in GIMP), then the image stays black.

Revision history for this message
Tim Peeters (tpeeters) wrote :
Revision history for this message
Tim Peeters (tpeeters) wrote :

This also shows black instead of the image and doesn't use any UITK components:

Rectangle {
    color: "green"
    width: 600
    height: 600

    Image {
        id: crossFader
        anchors {
            fill: parent
            margins: 20
        }
        source: "/home/tim/Pictures/very_large_orange.png"
}

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Michael Zanetti (mzanetti) wrote :

I've dropped the CrossFadeImage from unity8 and switched the code over to use the SDK one.

Timp, seems the unity8 one had better tests than the SDK one. Feel free to copy them over to the SDK before they are lost. See the attached unity8 branch.

Changed in unity8:
status: New → In Progress
assignee: nobody → Michael Zanetti (mzanetti)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:unity8 at revision 343, scheduled for release in unity8, milestone ubuntu-13.09

Changed in unity8:
status: In Progress → Fix Committed
Revision history for this message
Tim Peeters (tpeeters) wrote :

I propose an update to the CrossFadeImage API where sourceSize can be set by the application.

If sourceSize is not set, and the image is too large, it will still appear as black. Setting the sourceSize to something smaller than the maximum texture size will show the image. This is the same behavior as for Image.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 7.81.3+13.10.20130927.3-0ubuntu1

---------------
unity8 (7.81.3+13.10.20130927.3-0ubuntu1) saucy; urgency=low

  [ Michal Hruby ]
  * Correctly handle image URI scheme in results.

  [ Michał Sawicz ]
  * Make SHOW_DASH and HIDE_DASH close the current preview. (LP:
    #1231404)
  * Add a LazyImage component that shows an activity spinner for long-
    loading images and handles aspect ratio properly.
  * Fix Qt 5.1 FTBFS and suppress some build warnings.

  [ Albert Astals ]
  * Make sure we always have least have one column in the gridview. (LP:
    #1225391)
  * LVWPH: Make sure we always overshoot vertically. (LP: #1229851)
  * Remember the expanded categoryId and not the expanded index The
    index can change on search, and we still want to maintain it
    expanded in that case. (LP: #1230216)
  * Fix showHeader in an edge case of notShownByItsOwn Not all the tests
    i've added fail without the code fix, but i've added them just to be
    more covered . (LP: #1230187)

  [ Diego Sarmentero ]
  * Handling error signal from the DownloadTracker plugin (BUG:
    #1229744). (LP: #1229744)
  * Remove "Reviews and Comments" section from Application Preview until
    the feature is ready (BUG: #1226632) - Detect when the keyboard is
    being shown to allow the user to scroll the Preview even more if
    necessary to interact with the components at the bottom of that
    preview, and don't leave those components obscured behind the
    keyboard (BUG: #1226638). (LP: #1226632, #1224717, #1226638)

  [ Nick Dedekind ]
  * Brought messaging indicator inline with UnityMenuModel &
    UnityMenuAction. (LP: #1217676, #1217678)

  [ Pawel Stolowski ]
  * Support canned search queries returned by Home Scope.
  * Cancel previous actions and previews on new activation / preview.
    Expose previewed data row in Preview object.

  [ Michael Terry ]
  * Only enable the Bottombar when the HUD is available. (LP: #1220306)
  * Increase the "Skip intro" clickable area, making dismissing the edge
    demo intro feel more natural. (LP: #1220632)

  [ Michael Zanetti ]
  * drop our CrossFadeImage in favor of the SDK one. (LP: #1227783)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 358
 -- Ubuntu daily release <email address hidden> Fri, 27 Sep 2013 14:13:22 +0000

Changed in unity8 (Ubuntu Saucy):
status: New → Fix Released
Michał Sawicz (saviq)
Changed in unity8:
status: Fix Committed → Fix Released
Changed in ubuntu-ui-toolkit (Ubuntu Saucy):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-system-settings (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Peeters (tpeeters) wrote :

the patch for this is ready already a long time but we cannot get it in trunk until this bug is fixed: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1239646

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit at revision 798, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.2 KiB)

This bug was fixed in the package ubuntu-ui-toolkit - 0.1.46+14.04.20131105.1-0ubuntu1

---------------
ubuntu-ui-toolkit (0.1.46+14.04.20131105.1-0ubuntu1) trusty; urgency=low

  [ Albert Astals ]
  * Minor optimzations Add const & to foreach to save copies of
    "complex" types Remove initializations of QStrings to "" since they
    do nothing Return QString instead of "" since its faster Pass
    "complex" types as const & instead of copy to functions Not an
    optimization: Added const qualifier to two functions .

  [ Lars Uebernickel ]
  * Remove GIconProvider Use urls for file and data icons and the theme
    image provider (image://theme/) for themed icons.

  [ Kaleo ]
  * [visual design] Updated tabs chevron asset.

  [ Christian Dywan ]
  * Install translations for UI toolkit and gallery. (LP: #1239627)
  * Support checkbox used with an action.
  * Install autopilot modules in qmake not debian packaging.
  * Drop the $$ from system calls where output isn't needed.
  * Look for locale folder as per XDG basedir spec and rewrite test The
    new test case covers the whole range of changing languages, checking
    the strings from both QML and C++ and binding to a folder. (LP:
    #1175726, #1233071)
  * Define window within OrientationHelper to avoid a race condition.
    (LP: #1239760)

  [ Zsombor Egri ]
  * Support for taking themes from XDG_DATA_DIRS as well as from
    ~/.local/share. These paths are also added as import paths.
    UBUNTU_UI_TOOLKIT_THEMES_PATH overrules these import paths, and can
    have more than one path specified, each separated with column. (LP:
    #1221813)
  * Warnings treated as errors in all types of builds (debug or
    release). (LP: #1246290)
  * Introducing topmostItem property to drive whether InverseMouseArea
    should filter sensingArea events or to stay in the normal z-
    order/stack order of its parent. (LP: #1240460)

  [ Leo Arias ]
  * Added the go back method to the autopilot emulators. (LP: #1239751)
  * On the autopilot emulator, drag the toolbar to its full height. (LP:
    #1235060)
  * Initially show toolbar, but automatically hide after timeout. (LP:
    #1207369)
  * Added the change_state method to the CheckBox autopilot emulator.
    Cleaned up the autopilot gallery toggles tests.
  * Added the objectNames to the ComposerSheet buttons. (LP: #1244518)

  [ tpeeters ]
  * Update CrossFadeImage API so that sourceSize can be set by the
    applications. CHANGED in CrossFadeImage: readonly property size
    sourceSize TO property size sourceSize. (LP: #1227783)
  * Initially show toolbar, but automatically hide after timeout. (LP:
    #1207369)
  * Put tab bar in selection mode when apps are launched. (LP: #1223597)
  * Close tabbar and toolbar when user interacts with app contents. (LP:
    #1223604)

  [ Nicolas d'Offay ]
  * Added multiSelection bool and supporting code to OptionSelector and
    ItemSelector. This turns either component into a multiple choice
    selector. Fixed linked bugs. (LP: #1231936)

  [ Renato Araujo Oliveira Filho ]
  * Implemented emulator for swipe to remove. (LP: #1236464)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 820
 -- Ubu...

Read more...

Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Released
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu Saucy):
status: In Progress → Fix Committed
Revision history for this message
Iain Lane (laney) wrote :

Nothing for u-s-s to do here; closing

Changed in ubuntu-system-settings (Ubuntu):
status: Confirmed → Invalid
Changed in ubuntu-system-settings (Ubuntu Saucy):
status: Confirmed → Invalid
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu Saucy):
status: Fix Committed → Fix Released
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
assignee: nobody → Michael Zanetti (mzanetti)
no longer affects: unity8
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.