2009-08-14 9 views

Antwort

1

Warum möchten Sie immer etwas vermeiden, das speziell für diese Aufgabe entwickelt wurde? Jedenfalls gibt es eine Menge kommerzieller und Open-Source-Tools/Bibliotheken, die Ihnen dabei helfen können, und einige von ihnen haben wahrscheinlich APIs oder Bindungen für das, womit Sie arbeiten ...

Es ist möglich mit ImageMagick mit Frame-Extraktion mit convert Befehl:

convert movie.mpg[0] 

Sie können auch GIF aus Reihe von Bildern animiert create:

convert movie.avi[0,100,200] -background white -compose darken -flatten out.gif 

OR

convert movie.avi[100-200] -background white -compose darken -flatten out.gif 
0
Bitmap bm = MediaStore.Video.Thumbnails.getThumbnail(getContentResolver(), 1, 1, null); 
ImageView iv = (ImageView) findViewById(R.id.ImageView01); 
iv.setImageBitmap(bm); 

/* 
public static class 
MediaStore.Video.Thumbnails 
public static Bitmap getThumbnail (ContentResolver cr, long origId, int kind, BitmapFactory.Options options) 
Since: API Level 5 This method checks if the thumbnails of the specified image (origId) has been created. It will be blocked until the thumbnails are generated. 

Parameters 
cr ContentResolver used to dispatch queries to MediaProvider. 
origId Original image id associated with thumbnail of interest. 
kind The type of thumbnail to fetch. Should be either MINI_KIND or MICRO_KIND 
options this is only used for MINI_KIND when decoding the Bitmap 

Returns 
A Bitmap instance. It could be null if the original image associated with origId doesn't exist or memory is not enough. 
*/ 
Verwandte Themen