08-27-2012 02:59 PM
Are you referring to changing the size of a loaded image to make it smaller? Have you looked a the 'scaleX and scaleY" properties of the ImageView?
08-28-2012 12:51 AM
Actually my need is to show each image in device to be shown in thumbail view. So i think scaling each and every image would quite a bit memory and not a good option.
On earlier platforms like BB 7.1 and BB 6 we used to read thumbnail informations from "thumbs.db" file stored in each folder on file system. Does BB 10 NDK has this kind of machenism ?
09-04-2012 12:11 PM
How many images you plan on having in your list? ImageView could be a good option without calling scale functions; I don't think there is such a thing as a thumbs.db currently in thte works, unfortunately;
09-05-2012 01:23 PM
Exif library perhaps ?
09-05-2012 03:38 PM
Fortunately, something like thumbs.db does exist, but it is undocumented and the interface is changing anyways, so I wouldn't depend on what is presently available.
In the meantime, I suggest creating your own thumbnail cache in your app's sandbox or an appropriate location. You can open, load, scale, and save the thumbnails using libimg. This is how the media indexer on the device does it already.
09-05-2012 05:33 PM - edited 09-05-2012 05:38 PM
Ok, sean. I think try it with QImage's scale method at another thread and save thumbnail file in sandbox.
At other side I don't know Libimg, but I know is a very very low level library. Perhaps, Qt's way is a bit slower than Libimg, but is much more easier than this.
01-21-2013 02:26 PM
Ressurrecting an old thread, are there any news about the thumbnails database?
I suppose that you referring to the "thumbnails" table in /System/db/mmlibrary.db when you said that "something like thumbs.db does exist".
01-21-2013 04:57 PM
yes, that's what I'm referring to.
The problem with attempting to use that database is that it is undocumented and subject to change frequently. On top of this, there are some related pps objects you need to be aware of, and some other custom filesystem things. You also have to handle contention between other accessors. In a nutshell, it is not user-friendly.
We still do plan to ultimately wrap all of these warts up in an easy-to-use API. It just doesn't exist yet, and I am not sure what the ETA is.
Until then, you're going to have to roll your own thumbnail database in your app's sandbox, or do things on-the-fly.