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

Reply
Developer
Posts: 68
Registered: ‎08-16-2012
My Device: BB10 Dev Alpha
My Carrier: NA
Accepted Solution

Long images are shown black in ImageView

Hi All,

 

During testing, I noticed that long image (image with big Height value) will not shown correctly, it just shows a black background. e.g. for this image: http://ww2.sinaimg.cn/bmiddle/7bfc0806jw1e0yppgqzmfj.jpg, it will not shown if you put into asset/images and try to display it in a ImageView. (I tried in DevAlpha A, latest OS/SDK)

 

I think this is a platform/sdk bug, anyone has an idea? Is there a work around?

 

Thanks,

Dong

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

Re: Long images are shown black in ImageView

ImageView can't display images larger than 2048x2048.

You can try to load it into QImage then copy only the visible part into ImageView.

This thread has more details on the issue:

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


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 68
Registered: ‎08-16-2012
My Device: BB10 Dev Alpha
My Carrier: NA

Re: Long images are shown black in ImageView

Hi Zmey,

Thanks for your direction. Although the code are too old to run, i figured it out by the idea of it, and posted my working code there.

Dong