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: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Device won't display JPEG file

Developer
Developer
Posts: 60
Registered: ‎04-14-2014
My Device: z10
My Carrier: Digitel

Re: Device won't display JPEG file

Sorry, my bad!

 

Try with another image file, lighter and .png! Only curiosity!

My Answer is good? Nice! Please, Clicked the "Thanks" button, this is very helpful for me! :smileyhappy:
Mi respuesta es buena? Que bien! Por favor, haz clic en el botón "Gracias", esto es muy útil para mí! :smileyhappy:
Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Device won't display JPEG file

Yes, it works fine with another file. (and as mentioned, even with the problematic file, it shows up fine in the QML preview)

Developer
Developer
Posts: 60
Registered: ‎04-14-2014
My Device: z10
My Carrier: Digitel

Re: Device won't display JPEG file

But another files are show in the device?

My Answer is good? Nice! Please, Clicked the "Thanks" button, this is very helpful for me! :smileyhappy:
Mi respuesta es buena? Que bien! Por favor, haz clic en el botón "Gracias", esto es muy útil para mí! :smileyhappy:
Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Device won't display JPEG file

Yes.  If you're willing to spend this much effort replying on the forum, it might be a good use of your time to actually download the JPG file I linked to above, create an ImageView, and deploy it to your device to see if you are able to reproduce the issue.

Developer
Developer
Posts: 60
Registered: ‎04-14-2014
My Device: z10
My Carrier: Digitel

Re: Device won't display JPEG file

Apparently the problem is that the image exceeds 2048px that are manageable for OpenGL 2.0, you must resize the image before it is displayed in the ImageView.

 

See this: https://supportforums.blackberry.com/t5/Native-Development/ImageView-cascades-noob-question/m-p/1708...

My Answer is good? Nice! Please, Clicked the "Thanks" button, this is very helpful for me! :smileyhappy:
Mi respuesta es buena? Que bien! Por favor, haz clic en el botón "Gracias", esto es muy útil para mí! :smileyhappy:
Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Device won't display JPEG file

Fascinating!  How did you figure that out?!

 

It's also interesting because as I was pondering what could possibly be the problem, the size of the image came to mind, because I noticed it was larger than my other photos that were working.

 

It seems somewhat insane that the console wouldn't show some very noticeable output to let you know this was the case.

 

Thanks so much!

Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Device won't display JPEG file

I haven't tried the suggested solution yet, but the point about 2048 being the max doesn't seem to be quite correct, since I have lots of photos that are 3264x1836, and they can load fine. (I think that's the size of photos that the BB10 camera takes)

 

Anyway, I'll do some experimentation and see if I can figure out what the max dimensions are. (and if that is in fact the solution, but I suspect you're on to something)

Developer
Developer
Posts: 60
Registered: ‎04-14-2014
My Device: z10
My Carrier: Digitel

Re: Device won't display JPEG file

I think that 2048px restriction is for width...

My Answer is good? Nice! Please, Clicked the "Thanks" button, this is very helpful for me! :smileyhappy:
Mi respuesta es buena? Que bien! Por favor, haz clic en el botón "Gracias", esto es muy útil para mí! :smileyhappy:
Developer
Posts: 579
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Re: Device won't display JPEG file

By my testing, images appear to fail to display if their width is much more than 4050 pixels, OR their height is much more than 4050 pixels.