2009-08-14 21 views

答えて

1

あなたは、なぜそのタスクのために特別に設計されたものを使用しないようにしたいのですか?とにかくこれに役立つ商用とオープンソースのツールやライブラリがたくさんありますが、その中にはAPIやバインディングがあるかもしれません...

ImageMagickでは、 convertコマンド:

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

OR

convert movie.mpg[0] 

あなたはまた、フレームの範囲からアニメーションGIF を作成することができます

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. 
*/ 
関連する問題