fill aspect ImageView

ImageView {}
ID: bannerImage
objectName: "bannerImage."
horizontalAlignment: P
verticalAlignment: VerticalAlignment.Bottom
scalingMethod: ScalingMethod.AspectFit
}

Have this imageview, problem is that I bring the imageview from a url... If aspectfit aspectfill all sends me same results.

I want imageview to take all way up to the top

import bb.cascades 1.0

Page {

    onCreationCompleted: {
        zain.loadImage();
    }
    Container {
        background: Color.create("#52c1b1")
        horizontalAlignment: HorizontalAlignment.Fill
        verticalAlignment: VerticalAlignment.Bottom
        layout: StackLayout {
            orientation: LayoutOrientation.BottomToTop
        }
        preferredHeight: Infinity
        bottomPadding: 25

            Label {
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Bottom
                text: qsTr("loadingApplication")  + Retranslate.onLocaleOrLanguageChanged
                textStyle.base: SystemDefaults.TextStyles.TitleText
                textStyle.color: Color.White
            }
            ActivityIndicator {
                id: activityIndicator
                objectName: "activityIndicator"
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Bottom
                running: true
            }
            ImageView {
                id: bannerImage
                objectName: "bannerImage"
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Bottom
                scalingMethod: ScalingMethod.AspectFit
            }
        }

}

Hi babakar,.

As mentioned on this link: 'the area assigned to the ImageView is determined by its size settings.' Have you tried to set these parameters for your ImageView take care all the way up?

Tags: BlackBerry Developers

Similar Questions

  • L2445m does not allow me to change the custom scale

    This is a new screen (1920 x 1200 px) on a desktop pc, which replaces a monitor 1280 x 1024.

    I have an application that should be used in the proportions of 1280/1024, but gets stretched on the new L2445m. The menu items of Image-Online Custom Scaling control monitor (and sharpness) are faded/grey. Why is this and how can I get change them the scale? Also, the pc video card does not offer any method to change the scaling for applications.

    Kind regards... Chris

    I think that you will also find that once you use a non-native resolution, the Image control Option is not greyed. Then, you can select fill Aspect if it is always tense.

    See you soon,.

  • Discover the 1280 X 1024 on s1931a without distortion

    Hello-

    is it possible to change a resolution of 1280 x 1024 on my new s1931a without distortion?  I don't care if it shows with black side bars.  currently when I try to do this in windows 7 it distorts the image (fun vertically it fills the entire screen).  I have not installed all the drivers for the monitor (it did come with a driver disk, however).  Windows 7 detects the monitor very well and shows the 1366 x 768 native.  also, my computer is a brand new hp.  Thanks for your help!

    I thought about it!

    The s1931a is able to display many resolutions, including of 1280 x 1024.  The integrated ATI graphics card can handle it too, it's the monitor that needs to be adjusted to the correct proportions.  I had to use the buttons under the screen and go to the Menu-> Image-> Custom Scaling control-> fill Aspect ratio.  I don't think that I was able to select this option before when the native resolution was created under Windos 7, then you will probably have to set the desired first resolution before making adjustment on the command monitor.  Seems not as great as the native resolution of 1280 x 1024 and the text is difficult to read, but it meets my goal.

    Thank you for your suggestions anyway, Big Dave.  Thank you!

  • Some game programs won't open full screen.

    I have a wide screen 22 inch and Doom3, Tiberium Sun, Armada2, etc won't open full screen. I have set myself properties to optimize, but still have the same problem.  Doom3 and Armada2 fill the screen from top to bottom, but there are black bars on the left and right of the screen.  Sun of Tiberium works well, but it is centered in the middle of the screen.  I updated to Windows 7 and this seems to be my only problems.

    Any suggestions?

    Thank you.

    Some of the games probably do not support widescreen and your screen resolution.  The basic rule is defined at each game to run at the resolution of your screen.  Probably of 1920 x 1200 or 1440x900ish, or somewhere along those lines.

    Sun of Tiberium goes up to 800 x 600.  Doom 3 out of the box only also has options for 4:3 and only widescreen with some custom options (more here on the configuration of Doom 3).

    If you open the menu of the monitor should be options of fill, aspect and 1:1, or something in that sense.  Barrier will extend some image to fill the entire screen, look to stretch, but don't exchange not aspact and 1:1 ratio shows the game in any resolution that he uses. Paul Smith - MVP for Windows desktop experience... I crawled off NNTP - for now. Detachment Aldershot, United Kingdom. On the internet at windowsresource.net and dasmirnov.net. Please post back to let us know what works and what does not. :-)

  • W2338H display problems

    Just bought a HPW2338H monitor and have a few questions about the display. When I I select "fill the screen" under the custom menu of scaling, the display indeed occupy the screen, but everything is "tense", i.e. a round object is now oval, stretched horizontally.  When I select "fill aspect ratio", things are stretched, but there are black areas about 1 1/4 "wide on each side of the screen.  What is the advantage of having the extra screen wide if she to deform the images to use?  And when I play a big movie screen, he still has empty spaces side and above the HUGE blank areas and bottom.  I have a Sceptre 22 "widescreen and it has none of these problems, the movie fills the screen side by side and white areas up and down are much smaller.  It seems to me to pay for a large number of real estate that I can't use.  Your help in this matter will be appreciated, faster the better because as it is now this thing will return the storel.

    Hello

    You have set the resolution 1920 x 1080 (product card: http://support.hp.com/us-en/document/c01604006)

    ?

  • HP 2311xi monitor screen scaling

    Have a HP 2311xi flat screen monitor and all was fine, until that I upgraded my operating system to Windows Pro 8.0 8.1 Windows Pro and now my monitor screen size about 1/2 inch black screen around all the edges of the screen.  Everything was good with Windows 8.0 and filled the display properly shape edge to edge.  I went to the monitor and under Main Menu display controls; Image control; Customer scale; "Fill screen" and "fill Aspect ratio" grayed out and unavailable. The only option is "Overscan" and who give me 1/2 border black thumb or cause the "overscan" and put the part of the screen available off the screen. In use HDMI as a source of input to the screen, however, I got no problem with is Windows 8.0.

    In addition to return to Windows 8.0, all suggested fixes for this issue.

    Thank you

    BillMNJ

    Hello

    Please mark this thread "resolved" then the other members of the forum can benefit from our experience.

    Thank you

    Jaco

  • Working with GIF Image

    Hello guys,.

    I want to use a GIF image in a Qml (ImageView) file.

    I've used this, but it did not work. (No animation)

    ImageView {}
    horizontalAlignment: HorizontalAlignment.Fill
    verticalAlignment: VerticalAlignment.Fill
    ID: imageView
    imageSource: "3.gif".
    attachedObjects:]
    ImageAnimator {}
    ID: imageAnimator
    animatedImage: imageView.image
    started: true
    }
    ]
    }

    Thank you

    He worked with a Web view

    WebView

    {

    URL:"local:///assets/image.gif".

    }

  • Output manual is not display the dialog box

    Hello

    I try to display a dialog box to the exit, but it does not work. Here is my code.

    import bb.cascades 1.0

    import bb.system 1.0

    import bb.cascades.advertisement 1.0

    {Page}

    Menu.Definition: MenuDefinition {}

    settingsAction: {SettingsActionItem}

    onTriggered: {}

    }

    }

    }

    {Of container

    {Of container

    ID: mainContainer

    layout: {DockLayout}

    }

    horizontalAlignment: HorizontalAlignment.Fill

    verticalAlignment: VerticalAlignment.Fill

    {Of container

    ID: bgContainer

    verticalAlignment: VerticalAlignment.Fill

    horizontalAlignment: HorizontalAlignment.Fill

    ImageView {}

    objectName: "bgImage".

    imageSource: ' images/bg_green.png.

    scalingMethod: ScalingMethod.AspectFill

    verticalAlignment: VerticalAlignment.Fill

    horizontalAlignment: HorizontalAlignment.Fill

    }

    }

    {Of container

    ID: contentContainer

    leftPadding: 20.0

    topPadding: 10.0

    rightPadding: 20.0

    bottomPadding: 0.0

    verticalAlignment: VerticalAlignment.Fill

    horizontalAlignment: HorizontalAlignment.Fill

    {Of container

    ID: titleContainer

    verticalAlignment: VerticalAlignment.Top

    horizontalAlignment: HorizontalAlignment.Fill

    layout: {StackLayout}

    direction: LayoutOrientation.LeftToRight

    }

    topPadding: 10.0

    {Of container

    ID: imageContainer

    leftPadding: 20.0

    topPadding: 10.0

    bottomPadding: 10.0

    rightPadding: 20.0

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    ImageView {}

    ID: icon

    imageSource: ' images/ic_safe.png.

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    objectName: "stateImage."

    }

    }

    {Of container

    ID: topTextContainer

    verticalAlignment: VerticalAlignment.Center

    {Label

    text: 'SAFE'

    textStyle.color: Color.White

    textStyle.fontSize: FontSize.PointValue

    textStyle.fontWeight: FontWeight.Bold

    objectName: "stateLabel."

    textStyle.fontSizeValue: 17.0

    }

    }

    }

    {Of container

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    layoutProperties: {StackLayoutProperties}

    spaceQuota: 1.0

    }

    {Of container

    horizontalAlignment: P

    verticalAlignment: VerticalAlignment.Center

    layoutProperties: {StackLayoutProperties}

    spaceQuota: 1.0

    }

    layout: {DockLayout}

    }

    {Of container

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    {Of container

    ID: usedContainer

    {Of container

    ID: percentContainer

    {Label

    ID: percentLabel

    text: "74."

    textStyle.color: Color.White

    textStyle.fontSize: FontSize.PointValue

    textStyle.fontWeight: FontWeight.Normal

    textStyle.fontSizeValue: 40.0

    textStyle.textAlign: TextAlign.Center

    textStyle.fontStyle: FontStyle.Normal

    objectName: "percentLabel."

    }

    }

    {Of container

    leftPadding: 30.0

    rightPadding: 30.0

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    ImageView {}

    imageSource: ' images/ic_percentage.png.

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    }

    {Label

    text: 'used '.

    textStyle.color: Color.White

    textStyle.fontSize: FontSize.PointValue

    textStyle.fontSizeValue: 8.0

    }

    }

    layout: {StackLayout}

    direction: LayoutOrientation.LeftToRight

    }

    verticalAlignment: VerticalAlignment.Top

    }

    {Of container

    ID: remContainer

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: HorizontalAlignment.Fill

    {Of container

    layout: {StackLayout}

    direction: LayoutOrientation.LeftToRight

    }

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    {Of container

    ID: countContainer

    rightPadding: 10.0

    leftPadding: 10.0

    topPadding: 0.0

    verticalAlignment: VerticalAlignment.Bottom

    {Label

    ID: countLabel

    text: "7."

    textStyle.color: Color.White

    textStyle.fontSize: FontSize.PointValue

    textStyle.fontSizeValue: 14.0

    objectName: "daysLabel."

    }

    }

    {Of container

    verticalAlignment: VerticalAlignment.Bottom

    bottomMargin: 0.0

    bottomPadding: 12.0

    {Label

    text: "days left".

    textStyle.color: Color.White

    objectName: "daysInfoLabel."

    textStyle.fontSize: FontSize.PointValue

    textStyle.fontSizeValue: 8.0

    }

    }

    }

    {Of container

    horizontalAlignment: P

    {Label

    ID: rangeLabel

    text: "2 February - 1 March"

    textStyle.color: Color.White

    objectName: "daysRangeLabel."

    textStyle.fontSize: FontSize.PointValue

    textStyle.fontSizeValue: 8.0

    }

    }

    }

    }

    }

    }

    {Of container

    verticalAlignment: VerticalAlignment.Bottom

    horizontalAlignment: P

    layout: {StackLayout}

    direction: LayoutOrientation.LeftToRight

    }

    {Of container

    horizontalAlignment: P

    layout: {StackLayout}

    direction: LayoutOrientation.TopToBottom

    }

    topPadding: 10.0

    bottomPadding: 10.0

    verticalAlignment: VerticalAlignment.Bottom

    layoutProperties: {StackLayoutProperties}

    spaceQuota: 1.0

    }

    {Of container

    horizontalAlignment: P

    ImageView {}

    imageSource: ' images/ic_cell.png.

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    visible: true

    }

    }

    {Of container

    ID: cellContainer

    horizontalAlignment: P

    topPadding: 5.0

    bottomPadding: 5.0

    visible: true

    {Of container

    horizontalAlignment: P

    {Label

    text: "147.4 MB.

    textStyle.color: Color.White

    textStyle.fontWeight: FontWeight.Bold

    objectName: "cellTotalLabel."

    textStyle.fontSize: FontSize.PointValue

    textStyle.fontSizeValue: 8.0

    }

    }

    {Of container

    topPadding: 5.0

    bottomPadding: 5.0

    horizontalAlignment: P

    {Label

    text: "140 MB, 7.4 MB out."

    textStyle.color: Color.White

    textStyle.fontSize: FontSize.PointValue

    verticalAlignment: VerticalAlignment.Bottom

    objectName: "cellCountLabel."

    textStyle.fontSizeValue: 6.0

    }

    }

    }

    }

    {Of container

    horizontalAlignment: HorizontalAlignment.Fill

    layoutProperties: {StackLayoutProperties}

    spaceQuota: 1.0

    }

    layout: {StackLayout}

    direction: LayoutOrientation.TopToBottom

    }

    topPadding: 10.0

    bottomPadding: 10.0

    {Of container

    horizontalAlignment: P

    ImageView {}

    imageSource: ' images/ic_wifi.png.

    verticalAlignment: VerticalAlignment.Center

    horizontalAlignment: P

    }

    }

    {Of container

    ID: wifiContainer

    horizontalAlignment: P

    bottomPadding: 5.0

    topPadding: 5.0

    {Of container

    horizontalAlignment: P

    {Label

    text: '26.6 MB.

    textStyle.color: Color.White

    textStyle.fontWeight: FontWeight.Bold

    textStyle.fontSize: FontSize.PointValue

    textStyle.fontSizeValue: 8.0

    objectName: "wifiTotalLabel."

    }

    }

    {Of container

    topPadding: 5.0

    bottomPadding: 5.0

    horizontalAlignment: P

    {Label

    text: "20 MB, 6.6 MB out."

    textStyle.color: Color.White

    textStyle.fontSize: FontSize.PointValue

    verticalAlignment: VerticalAlignment.Bottom

    objectName: "wifiCountLabel."

    textStyle.fontSizeValue: 6.0

    }

    }

    }

    }

    }

    {Of container

    objectName: "bannerContainer."

    horizontalAlignment: P

    }

    }

    }

    }

    onCreationCompleted: {}

    Application.autoExit = false;

    Application.manualExit.connect (onManualExit);

    }

    function onManualExit() {}

    Show)

    }

    attachedObjects:]

    {SystemDialog}

    ID: dialogue

    Title: «DataCheck Pro»

    body: "" the application must always be running to make estimates as accurate as possible. "" Are you sure to terminate the application? »

    confirmButton.label: "Close"

    onFinished: {}

    If (dialog.result == 3) {}

    Dialog.Cancel ();

    } else {}

    Dialog.Cancel ();

    Application.Quit () / / myPlayer.stop)

    }

    }

    }

    ]

    }

    Help, please?

    Solved by putting setClosePrompt()

  • Sizing of an ImageView to fill its Parent

    I use a ListView to display photo thumbnails in a grid. I also use a custom ListItemProvider implemented in C++ code.

    The size of the grid cells varies from one device to. So my ImageView inside the cell of the grid must use a height that fills the container it is. I tried this:

    Container {
      background: Color.Black
      preferredWidth: 500
      preferredHeight: 500
    
      ImageView {
          horizontalAlignment: HorizontalAlignment.Fill
          verticalAlignment: VerticalAlignment.Fill
          imageSource: "asset:///images/star.png"
      }
    }
    

    But which translates:

    Notice how the WIDTH of the image can be developed to fill his tank, but strangely the image height does not work.

    I can put the preferredHeight of the ImageView to influence its height, but that seems to be a bad solution, because how will I know the height in pixels of a cell of the grid in a device independent way?

    So: How should ImageViews to fill the height of their container?

    Thank you
    Daniel

    Oops. I needed to specify the layout of the ImageView to be DockLayout.

  • Define an ImageView to fill the entire screen

    Hi veveryone,

    I need to have the ImageView stretch to fill the screen. How can I go about it?

    Should I get the height and width of the screen? If so, how?

    Thank you

    The code below does not work, it only centers the image

     Page *root = new Page;
    
        Container *container=new Container();
        container->setLayout(DockLayout::create());
        container->setBottomPadding(0);
        container->setLeftPadding(0);
        container->setTopPadding(0);
        container->setRightPadding(0);
    
        container->setBottomMargin(0);
        container->setLeftMargin(0);
        container->setTopMargin(0);
        container->setRightMargin (0);
    
        container->setParent(root);
    
        ImageView* img= ImageView::create("asset:///images/image.png");
        img->setHorizontalAlignment(HorizontalAlignment::Center);
        img->setVerticalAlignment(VerticalAlignment::Center);
        img->setScalingMethod(ScalingMethod::AspectFill);
    
        container->add(offImageView);
    
        root->setContent(container);
    

    Try this

     Page *root = new Page;
    
            Container *container=new Container();
            container->setLayout(DockLayout::create());
            container->setBottomMargin(0);
            container->setLeftMargin(0);
            container->setTopMargin(0);
            container->setRightMargin (0);
    
            container->setParent(root);
    
            ImageView* offImageView= ImageView::create("asset:///images/image.jpg");
            offImageView->setLayoutProperties(DockLayoutProperties::create().horizontal(HorizontalAlignment::Fill).vertical(VerticalAlignment::Fill));
            offImageView->setScalingMethod(ScalingMethod::AspectFill);
    
            container->add(offImageView);
    
            root->setContent(container);
    
        Application::setScene(root);
    
  • DVD burned in first pro cc does not fill the screen. Desire a 4:3 aspect ratio

    I use first pro cc. I burned a dvd several times, trying different presets. Every time the dvd never fills the screen. It does not lool like box (16 x 9) letters. There is space around the photo / video. Need quick assistance, project is already late. Thanks in advance.

    Theo Smith

    Have you used one of the mpeg-2 DVD presets?

    Which one?

    MPE or Premiere Pro?

    Please show a screenshot of your output settings.

  • ImageView expected to auto-sense orientation

    A few comments to the people of the API:

    Shouldn't the ImageView read the EXIF of a JPEG image and automatic image rotation? And so by default, shouldn't there not a property such as 'autoOrient' or 'function' that this happens?

    Seen developers manually read the EXIF data, manually turn the images, etc., seems to be a waste of developer time.

    Follow-up question: if I do it manually and you end up with a QImage, how to recognize an ImageView to use a QImage? Is this possible?

    And one last question followed: what type is the property of 'image' of the ImageView?  He says it's a QVariant, but is not very useful.  Can we set this property, or is read-only?  Overall, I think that the "image" property documentation could use some improvements.

    Thank you

    Daniel

    Understood that through:

    http://supportforums.BlackBerry.com/T5/Cascades-development/rotation-and-translation-cuts-the-image/...

    ... my container was not big enough. I have change the container that has the ImageView to fill the page, and which prevented the cropping. I'm glad it was something simple.

    Here is a very rough code incase it is useful to someone else:

    #include 
    #include 
    #include 
    #include 
    
    ...
    
    // Gets called when the root container is resized, so that we can track
    // how large it is.
    void PhotosModel::updateContainerSize(qreal width, qreal height)
    {
        // Is this the initial call to updateContainerSize, or did
        // the size of the container change because of an orientation
        // change?
        bool initOrReInit = (containerWidth != (int)width);
    
        containerWidth = width;
        containerHeight = height;
    
        if (initOrReInit && imageLoadedFlag)
        {
            // When we tried to load this, we didn't yet know the width of the
            // screen. Now that we do, display the image.
            qDebug() << "Delayed image load";
            loadImage(photos.at(curPhoto).absoluteFilePath());
        }
    }
    
    void PhotosModel::loadImage(QString file)
    {
        imageLoadedFlag = true;
    
        // If the screen hasn't loaded yet and we don't know how wide
        // the container is, then hold off until we do.
        if (containerWidth == 0)
        {
            qDebug() << "Can't display image yet";
            return;
        }
    
        int width = -1;
        int height = -1;
        bool xyFlip = false;
    
        ExifLoader* loader = exif_loader_new();
        exif_loader_write_file(loader, file.toStdString().c_str());
        ExifData* data = exif_loader_get_data(loader);
    
        imageView->setRotationZ(0);
    
        int desiredRotation = 0;
    
        if (data != NULL)
        {
            //exif_data_dump(data);
    
            // Treating this as int* seems to result in corruption / bad behavior.
            // I think orientation is supposed to be a 'short int', which I would have
            // thought would be 2 bytes, but short int * doesn't seem to be consistent
            // either. So far char* seems to work.
            char* orientationPtr = (char *) GetExifValue(data, EXIF_TAG_ORIENTATION);
    
            if (orientationPtr != NULL)
            {
                //int orientation = *orientationPtr;
    
                int orientation = orientationPtr[0];
    
                // 1 -> OK
                // 3 -> Rotate 180
                // 6 -> CC 90
                // 8 -> C 90
    
                qDebug() << "Orientation: " << orientation;
    
                if (orientation == 3)
                {
                    desiredRotation = -180;
                }
                // NOTE: Also doing this for orientation == 0, because I have
                //       a photo with orientation 0 that seems to need this.
                //       Confused. Picasa seems to know that the image needs
                //       this rotation.
                else if (orientation == 6 || orientation == 0)
                {
                    desiredRotation = 90;
                    xyFlip = true;
                }
                else if (orientation == 8)
                {
                    desiredRotation = -90;
                    xyFlip = true;
                }
                else
                {
                    desiredRotation = 0;
                }
    
                //qDebug() << "Width: " << width << ", Height: " << height;
            }
    
            long* widthPtr = (long *) GetExifValue(data, EXIF_TAG_PIXEL_X_DIMENSION);
            if (widthPtr != NULL)
            {
                width = (int)*widthPtr;
            }
    
            long* heightPtr = (long *) GetExifValue(data, EXIF_TAG_PIXEL_Y_DIMENSION);
            if (heightPtr != NULL)
            {
                height = (int)*heightPtr;
            }
        }
    
        if (width == -1 || height == -1)
        {
            // Trouble. We don't know how large the photo is.
            // For now we'll just show nothing. Will this ever happen? How can we
            // fail more gracefully?
            imageView->setVisible(false);
            ErrorHelpers::showDialog("Missing EXIF Data", "The EXIF data for this image doesn't indicate its width/height, and so it cannot be displayed.");
        }
        else
        {
            imageView->setVisible(true);
        }
    
        int virtualContainerWidth;
        int virtualContainerHeight;
    
        if (xyFlip)
        {
            qDebug() << "xyFlip";
            virtualContainerWidth = containerHeight;
            virtualContainerHeight = containerWidth;
        }
        else
        {
            virtualContainerWidth = containerWidth;
            virtualContainerHeight = containerHeight;
        }
    
        qDebug() << "virtualContainerWidth: " << virtualContainerWidth;
        qDebug() << "virtualContainerHeight: " << virtualContainerHeight;
    
        float imageAspect = (float)width / (float)height;
    
        qDebug() << "imageAspect: " << imageAspect;
    
        float screenAspect = (float)virtualContainerWidth / (float)virtualContainerHeight;
    
        qDebug() << "screenAspect: " << screenAspect;
    
        int imageScreenWidth;
        int imageScreenHeight;
    
        if (imageAspect > screenAspect)
        {
            // Image is wider than screen aspect wise, so X will be limiting dimension.
            if (width > virtualContainerWidth)
            {
                imageScreenWidth = virtualContainerWidth;
            }
            else
            {
                imageScreenWidth = width;
            }
            // Better to round here?
            imageScreenHeight = (int)((float)imageScreenWidth / imageAspect);
    
            qDebug() << "Limited by X";
            qDebug() << "imageScreenWidth: " << imageScreenWidth;
            qDebug() << "imageScreenHeight: " << imageScreenHeight;
        }
        else
        {
            // Image is taller than screen aspect wise, to Y will be limiting dimension.
            if (height > virtualContainerHeight)
            {
                imageScreenHeight = virtualContainerHeight;
            }
            else
            {
                imageScreenHeight = height;
            }
            // Better to round here?
            imageScreenWidth = (int)((float)imageScreenHeight * imageAspect);
    
            qDebug() << "Limited by Y";
            qDebug() << "imageScreenWidth: " << imageScreenWidth;
            qDebug() << "imageScreenHeight: " << imageScreenHeight;
        }
    
        int imageX;
        int imageY;
        imageX = (int)((float)containerWidth / 2.0f - (float)imageScreenWidth / 2.0f);
        imageY = (int)((float)containerHeight / 2.0f - (float)imageScreenHeight / 2.0f);
    
        qDebug() << "imageX: " << imageX;
        qDebug() << "imageY: " << imageY;
    
        imageView->setPreferredWidth(imageScreenWidth);
        imageView->setPreferredHeight(imageScreenHeight);
    
        AbsoluteLayoutProperties* layoutProperties = new AbsoluteLayoutProperties();
    
        layoutProperties->setPositionX(imageX);
        layoutProperties->setPositionY(imageY);
    
        imageView->setLayoutProperties(layoutProperties);
    
        qDebug() << "desiredRotation: " << desiredRotation;
    
        imageView->setRotationZ(desiredRotation);
    
        imageView->setImage(QUrl("file://" + file));
    }
    
    void* PhotosModel::GetExifValue(ExifData* data, ExifTag tag)
    {
        for (int i = 0; i < EXIF_IFD_COUNT; i++)
        {
            ExifContent* content = data->ifd[i];
            ExifEntry* entry = exif_content_get_entry(content, tag);
            if (entry != NULL)
            {
                return entry->data;
            }
        }
    
        return NULL;
    }
    

    ... and some related QML...

    Page {
        Container {
            id: rootContainer
            objectName: "rootContainer"
            background: Color.Black;
            layout: DockLayout {
            }
            horizontalAlignment: HorizontalAlignment.Fill
            verticalAlignment: VerticalAlignment.Fill
    
            attachedObjects: [
                // This handler is tracking the layout frame of the button.
                LayoutUpdateHandler {
                    id: handler
                    onLayoutFrameChanged: {
                        photosModel.updateContainerSize(layoutFrame.width, layoutFrame.height);
                    }
                }
            ]
    
            Container {
                layout: AbsoluteLayout {}
                horizontalAlignment: HorizontalAlignment.Fill
                verticalAlignment: VerticalAlignment.Fill
    
                ImageView {
                    id: imageView
                    objectName: "imageView"
    
                    scalingMethod: ScalingMethod.Fill
    
                    //scalingMethod: ScalingMethod.AspectFit
    
                    preferredWidth: 1
                    preferredHeight: 1
    
                    layoutProperties: AbsoluteLayoutProperties {
                        positionX: 1
                        positionY: 1
                    }
    
                    // Tried this, but the image is still animating into place.
                    loadEffect: ImageViewLoadEffect.None
    
                    attachedObjects: [
                        ImplicitAnimationController {
                            enabled: false
                        }
                    ]
                }
            }
    

    It is an amount disappointing nonsense to be caused by the ImageView doesn't Autodetect not the EXIF orientation flag. Please improve this BlackBerry.

  • DV5Z w/HDMI does not fill the entire screen

    I have a DV5Z with installed Blu - ray player. When I connect the Dv5z for my Panasonice 42 in plasma 720 p with the HDMI cable, the entire screen is not used in full picture format. There is a border of 1 inch around top, bottom, left and right.  My DV5Z has ATI HD 3200 graphics card and I do not understand where I need to adjust it so that it works ok. I already had a Dv5T with Intel 4500 and it worked fine, (in fact he filled a little too much about "1/4 of the image has been off the screen) but not the DV5z and I don't want to watch some blu ray movies with 1inch border around the screen. Where are the settings for me to adjust so that I can watch movies under the eyes?

    I adjusted the display settings, and it did not work. What could be the problem I need to adjust?

    I also adjusted the aspect of the TV and H-fill is not anywhere close and zoom isn't closed and 4; 3, that's not what I want to use.

    Any help is appreciated.

    Try using the ATI Catalyst software.  You should see an option for HDTV in the list on the left in the Advanced view.  It has a few decent explanations on how to use it to configure your TV.  I do not have my dv5z before me right now so I can't be more specific.  If you need more details, let me know, I got exactly the same problem and got it working.

  • How to fill a list box to a LabView VI TestStand?

    Recently started watching TestStand GUI and I work with one of the examples provided with TestStand.

    An important aspect of my test program, it is that I want the user to be able to dynamically choose which hardware plugged he/she wants to test on.

    so I thought that I have would display the COM ports connected in a ListBox control on the graphical interface, to let the user decide which com ports to use.

    This is a feature that you would 'normally' use the TestStand GUI for?

    How could fill a ListBox TestStand to a LabView VI? Say a simple that uses 'finding the names of resources VISA '.

    You cannot use a ListBox TestStand for this.  All user TestStand UI controls are based on a COM (ActiveX) object.  This means that they connect to the manager controls and then behave based on the events of the controls of Manager.

    You'll want to ouse a LabVIEW control (ListBox control in your case).  Then use the user interface Messages to retrieve information.

    http://www.NI.com/Tutorial/4532/en/

    http://zone.NI.com/reference/en-XX/help/370052N-01/tsexamples/infotopics/handleuimessage_labview/

    Or your other option is to have your movie file just pop up a LabVIEW VI with the list of the HW inside.  Then the user selects.  This is the easiest route, but it would take an annoying popup if you don't like that.

    Let me know if you have any questions on this subject.

    Kind regards

  • HP G60-230US laptop HDMI output never fills TV screen

    Interface using HDMI Cable output on my HP G60-230US laptop (Vista and built-in by default Intel graphics software), the image on a LCD TV ever fills the screen - it is only about half as bigger than the screen.  This happens on two LCD TVs in my house - both a new LG 1080 p and an older Magnavox 720 p set. I tried to set the resolution of the screen pretty much all values listed, but nothing has worked.  I have another laptop (an old Lenovo T60p

    with a higher end graphic card), that has a DVI output.  When I use it with a DVI-hdmi cable, two TVs show the total size of the image.

    Any suggestions on how to get the output full size on a HP G60-230US hdmi TV?

    This is the case of the question, with graphics and display using HDMI to image...

    I see you have graphics card intel card... here are the steps on the scale manually to the top of the image...

    • Right-click on the Windows desktop, and then click graphics properties to launch the Intel graphics properties window.
    • Click the arrow next to the scaling and select Customize Aspect Ratio
    • Now move the slider beside the horizontal/vertical scale until the image fit to the screen

Maybe you are looking for