Hi ,

We have developed a media player application on Android application
framework.

I'm facing problem in capturing thumbnails.

it is not giving any error but the bitmap am getting is null.

am attaching the code i hav written.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
public Bitmap fullSizeBitmap()  {

    try {
        //File dir=new File("/sdcard");
        //File files[] = dir.listFiles();
        ParcelFileDescriptor pfdInput = ParcelFileDescriptor.open( new
File("/sdcard/sample.3gp"), ParcelFileDescriptor.MODE_READ_ONLY);
        if(pfdInput == null)
            System.out.println(pfdInput + "---------------pfdInput NULL
----------------------");
        System.out.println(pfdInput + "---------------pfdInput Not NULL
----------------------");

        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inSampleSize = 1;

        options.inJustDecodeBounds = true;
        java.io.FileDescriptor fd = pfdInput.getFileDescriptor();

        Bitmap k = Bitmap.createBitmap(32, 32, Bitmap.Config.RGB_565);
         k = BitmapFactory.decodeFileDescriptor(fd, null, options);

        pfdInput.close();
        if(k == null)
        {
            System.out.println("---------------------K
Null-----------------------------");
        }
        return k;
    } catch (Exception ex) {
        System.out.println("---------------------Hits
Here-----------------------------");
        return null;
    }
}

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


If anyone knows how to do it, please help me.

Thanks and Regards,
Veda.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to