Is that normal that Images indexed in the MediaStore do not have
thumbnails generated until the Gallery app is launched and the user
actively navigates to the bucket where the image is stored ?
I think it's quite odd as I thought thulbnails generation was part of
media indexing.
> Is that normal that Images indexed in the MediaStore do not have
> thumbnails generated until the Gallery app is launched and the user
> actively navigates to the bucket where the image is stored ?
> I think it's quite odd as I thought thulbnails generation was part of
> media indexing.
I'm writing an app that creates images. I needed to code this from
scratch:
- Call bitmap.compress to store JPEG of full image and then use
MediaScannerConnection to insert it into the MediaStore.
- Generate thumbnails for my images: Insert new one into thumbnail
database and write out the corresponding JPEG. Using the MediaStore's
'insert()' method - which generates thumbnails as well, did not work
well, since it stores bitmaps as rather low resolution JPEGs (quality-
level = 50).
- Handle missing or corrupt thumbnails for the image-view part of my
app.
On Sep 30, 1:43 am, Nivek <kevin.gau...@gmail.com> wrote:
> A side question : when we want to display a thumbnail which is not
> available, is there a way to ask for its generation programmatically ?
> On 30 sep, 07:38, Nivek <kevin.gau...@gmail.com> wrote:
> > Is that normal that Images indexed in the MediaStore do not have
> > thumbnails generated until the Gallery app is launched and the user
> > actively navigates to the bucket where the image is stored ?
> > I think it's quite odd as I thought thulbnails generation was part of
> > media indexing.- Hide quoted text -
I would also be interested to know if the thumbnail generation can be
done programmatically?
If it is not possible what do we need to do to generate them and store
them in the Thumbnails ContentProvider so that the gallery app does
not duplicate thumbnails?
On Sep 30, 7:38 am, Nivek <kevin.gau...@gmail.com> wrote:
> Is that normal that Images indexed in the MediaStore do not have thumbnails generated until the Gallery app is launched and the user
> actively navigates to the bucket where the image is stored ?
> I think it's quite odd as I thought thulbnails generation was part of
> media indexing.
Yes, there is methods to do so, Browse the code of Gallery and look into the
file ImageGallery2.java. you will find how to push a thumbnail into that. I
have my app *FREE* hosted on Android Market that does the same thing , if
the image thumbnail is not present it will create one and use that. the app
name is "BrowseImage" that is a simple quick way of browsing images.
On Wed, Oct 7, 2009 at 5:29 PM, Jordan B. <jordan.bon...@gmail.com> wrote:
> I would also be interested to know if the thumbnail generation can be
> done programmatically?
> If it is not possible what do we need to do to generate them and store
> them in the Thumbnails ContentProvider so that the gallery app does
> not duplicate thumbnails?
> On Sep 30, 7:38 am, Nivek <kevin.gau...@gmail.com> wrote:
> > Is that normal that Images indexed in the MediaStore do not have
> thumbnails generated until the Gallery app is launched and the user
> > actively navigates to the bucket where the image is stored ?
> > I think it's quite odd as I thought thulbnails generation was part of
> > media indexing.
Hello, thanks for this, I have been also browsing the Camera app code
which hosts the Gallery and considering to "hack" something in order
to achieve an additional goal.
In my view of thumbnails management, the thumbnail generation itself
should be handled by the system. I don't think Android should let
every application generate thumbnails in different formats, sizes,
quality, locations.
What I am trying to achieve is to provide Camera code with the
original bitmap and let it generate the thumbnail and store it.
BUT, I think the real goal for android should better be to extract
thumbnails management from Camera app and put this task in the
MediaScanner or the Media ContentProvider.
We have a nice Media ContentProvider which allow us to retrieve Images
and their Thumbnails... but can't ensure that the thumbnail is
available so let people have to deal with their generation if it is
missing ?
On Thu, Oct 8, 2009 at 9:44 AM, Abdul Mateen <abmat...@gmail.com> wrote:
> Yes, there is methods to do so, Browse the code of Gallery and look into the
> file ImageGallery2.java. you will find how to push a thumbnail into that. I
> have my app *FREE* hosted on Android Market that does the same thing , if
> the image thumbnail is not present it will create one and use that. the app
> name is "BrowseImage" that is a simple quick way of browsing images.
> On Wed, Oct 7, 2009 at 5:29 PM, Jordan B. <jordan.bon...@gmail.com> wrote:
>> I would also be interested to know if the thumbnail generation can be
>> done programmatically?
>> If it is not possible what do we need to do to generate them and store
>> them in the Thumbnails ContentProvider so that the gallery app does
>> not duplicate thumbnails?
>> On Sep 30, 7:38 am, Nivek <kevin.gau...@gmail.com> wrote:
>> > Is that normal that Images indexed in the MediaStore do not have
>> > thumbnails generated until the Gallery app is launched and the user
>> > actively navigates to the bucket where the image is stored ?
>> > I think it's quite odd as I thought thulbnails generation was part of
>> > media indexing.
On Thu, Oct 8, 2009 at 1:21 AM, Kevin Gaudin <kevin.gau...@gmail.com> wrote:
> Hello, thanks for this, I have been also browsing the Camera app code > which hosts the Gallery and considering to "hack" something in order > to achieve an additional goal.
> In my view of thumbnails management, the thumbnail generation itself > should be handled by the system. I don't think Android should let > every application generate thumbnails in different formats, sizes, > quality, locations.
> What I am trying to achieve is to provide Camera code with the > original bitmap and let it generate the thumbnail and store it.
> BUT, I think the real goal for android should better be to extract > thumbnails management from Camera app and put this task in the > MediaScanner or the Media ContentProvider.
On Thu, Oct 8, 2009 at 5:13 PM, Marco Nelissen <marc...@android.com> wrote:
> On Thu, Oct 8, 2009 at 1:21 AM, Kevin Gaudin <kevin.gau...@gmail.com> wrote:
>> Hello, thanks for this, I have been also browsing the Camera app code
>> which hosts the Gallery and considering to "hack" something in order
>> to achieve an additional goal.
>> In my view of thumbnails management, the thumbnail generation itself
>> should be handled by the system. I don't think Android should let
>> every application generate thumbnails in different formats, sizes,
>> quality, locations.
>> What I am trying to achieve is to provide Camera code with the
>> original bitmap and let it generate the thumbnail and store it.
>> BUT, I think the real goal for android should better be to extract
>> thumbnails management from Camera app and put this task in the
>> MediaScanner or the Media ContentProvider.
---------- Forwarded message ---------- From: Marco Nelissen <marc...@android.com> Date: 8 oct, 16:13 Subject: Mediastore Thumbnails not generated until Gallery app is
launched ? To: Android Developers
On Thu, Oct 8, 2009 at 1:21 AM, Kevin Gaudin <kevin.gau...@gmail.com> wrote:
> Hello, thanks for this, I have been also browsing the Camera app code > which hosts the Gallery and considering to "hack" something in order > to achieve an additional goal.
> In my view ofthumbnailsmanagement, the thumbnail generation itself > should be handled by the system. I don't think Android should let > every application generatethumbnailsin different formats, sizes, > quality, locations.
> What I am trying to achieve is to provide Camera code with the > original bitmap and let it generate the thumbnail and store it.
> BUT, I think the real goal for android should better be to extract >thumbnailsmanagement from Camera app and put this task in the > MediaScanner or the Media ContentProvider.