Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 121
Registered: ‎02-08-2013
My Device: 9900
My Carrier: verizon
Accepted Solution

cannot see image captured using camera

[ Edited ]

I have captured an image and now i am trying to display this image, it is proving very difficult for me to do.

 

I have created imageTracker and when the image is loaded i am made aware of this in onStateChange but when i try to display the loaded image it is always blank, I have changed the imageView size and it does indeed go smaller on the screen but still blank.

 

I know the filename I am giving to imagetracker is ok (adding file://) because if i change it to something else onStateChange code doesn't get called.

 

I have been at this simple task for a few hours now so somebody please help me if you can.

 

 

void App::onStateChanged(bb::cascades::ResourceState::Type state)
{
    if(state == bb::cascades::ResourceState::Loaded)
    {
    	mImage = ImageView::create();
        mImage->setImage(mImageTracker->image());
        mImage->setMaxWidth(500);
        mImage->setMaxHeight(500);

        Page *page = new Page();
        
        	page->setContent(mImage);
        	
        	mRoot->pop();
        	mRoot->push(page);
    }
}

 

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: cannot see image captured using camera

Try putting your image inside Container

Developer
Posts: 121
Registered: ‎02-08-2013
My Device: 9900
My Carrier: verizon

Re: cannot see image captured using camera

Thank you for your reply.

 

I have tried the way I posted and also first putting the ImageView in a container and setting the container as content but neither show the image.

Developer
Posts: 121
Registered: ‎02-08-2013
My Device: 9900
My Carrier: verizon

Re: cannot see image captured using camera

Can somebody please tell me why on earth can't I see a simple jpg I have just captured on a page in navigationPane?

 

I have been at this for hours and still all I get is a blank square where I should be seeing the image. 

 

I think I understand what I should be doing (onStateChanged see above) but I get black square when I setImage().

 

Anyone Please?

Developer
Posts: 121
Registered: ‎02-08-2013
My Device: 9900
My Carrier: verizon

Re: cannot see image captured using camera

bump!

BlackBerry Development Advisor
Posts: 683
Registered: ‎11-29-2011
My Device: PRIV
My Carrier: Rogers

Re: cannot see image captured using camera

[ Edited ]

ImageView only handles images with dimensions less than 2048.  your photo is probably larger than this.

(to clarify, it is the max size of a texture supported by the GPU if I am not mistaken)

 

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: cannot see image captured using camera

http://supportforums.blackberry.com/t5/Cascades-Development/ImageView-cascades-noob-question/td-p/17...

This thread has sample code on resizing the image using QImage.

 


Andrey Fidrya, @zmeyc on twitter