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: 44
Registered: ‎05-22-2013
My Device: Blackberry 10
My Carrier: 02

QList<QByteArray> vs QList<QImage> issues

Which of the above formats will be suitable to store images.

 

considerations:

- memory

- Speed

BlackBerry Development Advisor
Posts: 57
Registered: ‎10-04-2012
My Device: developer
My Carrier: none

Re: QList<QByteArray> vs QList<QImage> issues

Depends on what your architecture is like, but QList<QImage> would not likely be something that you should use.

 

QList<QByteArray>: requires minimum in-memory data, requires cascades to decode the data every time you show it in an ImagView

 

QList<bb::cascades::Image>: requires more memory to store decoded image, showing it in an ImageView is the quickest possible.

 

QList<QUrl>: requires the least amount of memory, but images must be stored on disk. Allows you to use the cascades built-in image caching.

Regular Contributor
Posts: 205
Registered: ‎06-11-2013
My Device: Blackbery z10
My Carrier: RIM

Re: QList<QByteArray> vs QList<QImage> issues

It depends on what you want to do.

Developer
Posts: 44
Registered: ‎05-22-2013
My Device: Blackberry 10
My Carrier: 02

Re: QList<QByteArray> vs QList<QImage> issues

As for my requirements, I want to use it to tile a map. 

 

What about storing it as bb::ImageData

Highlighted
Regular Contributor
Posts: 205
Registered: ‎06-11-2013
My Device: Blackbery z10
My Carrier: RIM

Re: QList<QByteArray> vs QList<QImage> issues

Why dont you save it has byte stream?