- android
- android.accessibilityservice
- android.accounts
- android.content
- android.database.sqlite
- android.graphics
- android.location
- android.media
- android.net
- android.os
- android.text
- android.view
- android.view.inputmethod
- android.widget
- AbsListView
- AbsoluteLayout
- AbsSeekBar
- AbsSpinner
- AdapterView
- AnalogClock
- BaseAdapter
- BaseExpandableListAdapter
- Button
- CheckBox
- CheckedTextView
- Checkable
- Chronometer
- CompoundButton
- CursorAdapter
- CursorTreeAdapter
- DatePicker
- DialerFilter
- DigitalClock
- EditText
- Filter
- Filter.FilterListener
- Filter.FilterResults
- ExpandableListAdapter
- Filterable
- Gallery
- Gallery.LayoutParams
- GridView
- GridLayout
- RadioGroup
- ImageView
- HorizontalScrollView
- ImageButton
- ImageSwitcher
- FilterQueryProvider
- ListAdapter
- ListView
- MediaController
- QuickContactBadge
- RadioButton
- RatingBar
- RelativeLayout
- RemoteViews
- ResourceCursorAdapter
- ResourceCursorTreeAdapter
- Scroller
- ScrollView
- SearchView
- SeekBar
- SeekBar.OnSeekBarChangeListener
- SimpleAdapter
- SimpleCursorAdapter
- SimpleCursorTreeAdapter
- SimpleExpandableListAdapter
- SlidingDrawer
- Spinner
- SpinnerAdapter
- WrapperListAdapter
- TabHost
- TabHost.TabSpec
- TextView
- TimePicker
- Toast
- TableLayout
- TableRow
- TableRow.LayoutParams
- TabWidget
- TextSwitcher
- ToggleButton
- TwoLineListItem
- VideoView
- ViewAnimator
- ViewFlipper
- ViewSwitcher
- ZoomButtonsController
- ZoomButton
- ZoomControls
- dalvik.system
ThumbnailUtils
ThumbnailUtils
版本:Android 3.0 r1
结构
继承关系
public class ThumbnailUtils extends Object
java.lang.Object
android.media.ThumbnailUtils
类概述
为媒体生成常规缩略图。(Android123:该类为 Android2.2 新增类,可以帮助我们从 mediaprovider 中获取系统中的视频或图片文件的缩略图)
常量
public static final int OPTIONS_RECYCLE_INPUT
常量用于表示应该回收 extractThumbnail(Bitmap, int, int, int)
输入源图片(第一个参数),除非输出图片就是输入图片。
常量值:2 (0x00000002)
公共方法
public static Bitmap createVideoThumbnail (String filePath, int kind)
创建一张视频的缩略图。如果视频已损坏或者格式不支持可能返回 null。
参数
filePath 视频文件路径
kind 可以为 MINI_KIND 或 MICRO_KIND
public static Bitmap extractThumbnail (Bitmap source, int width, int height, int options)
创建所需尺寸居中缩放的位图。
参数
source 原始位图源
width 目标宽
height 目标高
options 在缩略图抽取时提供的选项
public static Bitmap extractThumbnail (Bitmap source, int width, int height)
创建所需尺寸居中缩放的位图。
参数
source 原始位图源
width 目标宽
height 目标高
补充
文章链接
ThumbnailUtils - Android2.2 新增类 (Android123)
[推荐] Android 缩略图类源代码 (Android123)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论