public class ImageTools extends java.lang.Object implements IImageTools
构造器和说明 |
---|
ImageTools() |
限定符和类型 | 方法和说明 |
---|---|
android.graphics.Bitmap |
blurImage(android.graphics.Bitmap bmp)
模糊效果
|
android.graphics.Bitmap |
blurImageAmeliorate(android.graphics.Bitmap bmp)
柔化效果(高斯模糊)(优化后比上面快三倍)
|
int |
calculateInSampleSize(android.graphics.BitmapFactory.Options op,
int reqWidth,
int reqheight) |
android.graphics.Bitmap |
createAlbumArt(java.lang.String filePath) |
android.graphics.Bitmap |
createReflectionImageWithOrigin(android.graphics.Bitmap bitmap)
获得带倒影的图片方法
|
android.graphics.Bitmap |
createVideoThumbnail(java.lang.String path,
int kind)
Create a video thumbnail for a video.
|
android.graphics.BitmapFactory.Options |
decodeBitmap(java.lang.String path)
从path中获取图片信息
|
android.graphics.Bitmap |
decodeBitmap(java.lang.String path,
int width,
int heigth)
从path中获取图片信息
|
android.graphics.Bitmap |
drawableToBitmap(android.graphics.drawable.Drawable drawable)
将Drawable转化为Bitmap
|
android.graphics.Bitmap |
extractThumbnail(android.graphics.Bitmap source,
int width,
int height)
Creates a centered bitmap of the desired size.
|
android.graphics.Bitmap |
extractThumbnail(android.graphics.Bitmap source,
int width,
int height,
int options)
Creates a centered bitmap of the desired size.
|
static ImageTools |
getInstance() |
android.graphics.Bitmap |
getRoundCornorImage(android.graphics.Bitmap bitmap,
int roundPixels)
制作圆角图片
|
android.graphics.Bitmap |
getRoundedCornerBitmap(android.graphics.Bitmap bitmap,
float roundPx)
获得圆角图片的方法
|
android.graphics.Bitmap |
halo(android.graphics.Bitmap bmp,
int x,
int y,
float r)
光晕效果
|
android.graphics.Bitmap |
olderBitmap(android.graphics.Bitmap bmp)
怀旧效果
|
android.graphics.Bitmap |
overlay(android.graphics.Bitmap bmp,
android.graphics.Bitmap overlay)
图片效果叠加
|
android.graphics.Bitmap |
sharpenImageAmeliorate(android.graphics.Bitmap bmp)
图片锐化(拉普拉斯变换)
|
android.graphics.Bitmap |
toFuDiao(android.graphics.Bitmap mBitmap)
浮雕效果
|
android.graphics.Bitmap |
toGrayscale(android.graphics.Bitmap bmpOriginal)
灰阶处理
|
android.graphics.Bitmap |
toHeibai(android.graphics.Bitmap mBitmap)
黑白处理
|
android.graphics.Bitmap |
toMohu(android.graphics.Bitmap bmpSource,
int Blur)
模糊处理
|
android.graphics.Bitmap |
toOld(android.graphics.Bitmap bitmap)
做旧处理
|
android.graphics.Bitmap |
toYouHua(android.graphics.Bitmap bmpSource)
油画处理
|
android.graphics.Bitmap |
zoomBitmap(android.graphics.Bitmap bitmap,
int w,
int h)
放大缩小图片
|
public static ImageTools getInstance()
public android.graphics.Bitmap getRoundCornorImage(android.graphics.Bitmap bitmap, int roundPixels)
getRoundCornorImage
在接口中 IImageTools
bitmap
- roundPixels
- public android.graphics.Bitmap createVideoThumbnail(java.lang.String path, int kind)
createVideoThumbnail
在接口中 IImageTools
path
- the path of video filekind
- could be MINI_KIND or MICRO_KINDpublic android.graphics.Bitmap extractThumbnail(android.graphics.Bitmap source, int width, int height)
extractThumbnail
在接口中 IImageTools
source
- original bitmap sourcewidth
- targeted widthheight
- targeted heightpublic android.graphics.Bitmap extractThumbnail(android.graphics.Bitmap source, int width, int height, int options)
extractThumbnail
在接口中 IImageTools
source
- original bitmap sourcewidth
- targeted widthheight
- targeted heightoptions
- options used during thumbnail extractionpublic android.graphics.Bitmap olderBitmap(android.graphics.Bitmap bmp)
olderBitmap
在接口中 IImageTools
bmp
- public android.graphics.Bitmap blurImage(android.graphics.Bitmap bmp)
blurImage
在接口中 IImageTools
bmp
- public android.graphics.Bitmap blurImageAmeliorate(android.graphics.Bitmap bmp)
blurImageAmeliorate
在接口中 IImageTools
bmp
- public android.graphics.Bitmap sharpenImageAmeliorate(android.graphics.Bitmap bmp)
sharpenImageAmeliorate
在接口中 IImageTools
bmp
- public android.graphics.Bitmap overlay(android.graphics.Bitmap bmp, android.graphics.Bitmap overlay)
overlay
在接口中 IImageTools
bmp
- 限制了尺寸大小的Bitmapoverlay
- public android.graphics.Bitmap halo(android.graphics.Bitmap bmp, int x, int y, float r)
halo
在接口中 IImageTools
bmp
- x
- 光晕中心点在bmp中的x坐标y
- 光晕中心点在bmp中的y坐标r
- 光晕的半径public android.graphics.Bitmap zoomBitmap(android.graphics.Bitmap bitmap, int w, int h)
zoomBitmap
在接口中 IImageTools
bitmap
- w
- h
- public android.graphics.Bitmap drawableToBitmap(android.graphics.drawable.Drawable drawable)
drawableToBitmap
在接口中 IImageTools
drawable
- public android.graphics.Bitmap getRoundedCornerBitmap(android.graphics.Bitmap bitmap, float roundPx)
getRoundedCornerBitmap
在接口中 IImageTools
bitmap
- roundPx
- public android.graphics.Bitmap createReflectionImageWithOrigin(android.graphics.Bitmap bitmap)
createReflectionImageWithOrigin
在接口中 IImageTools
bitmap
- public android.graphics.Bitmap toGrayscale(android.graphics.Bitmap bmpOriginal)
toGrayscale
在接口中 IImageTools
bmpOriginal
- public android.graphics.Bitmap toHeibai(android.graphics.Bitmap mBitmap)
toHeibai
在接口中 IImageTools
mBitmap
- public android.graphics.Bitmap toFuDiao(android.graphics.Bitmap mBitmap)
toFuDiao
在接口中 IImageTools
mBitmap
- public android.graphics.Bitmap toYouHua(android.graphics.Bitmap bmpSource)
toYouHua
在接口中 IImageTools
bmpSource
- public android.graphics.Bitmap toMohu(android.graphics.Bitmap bmpSource, int Blur)
toMohu
在接口中 IImageTools
bmpSource
- Blur
- public android.graphics.Bitmap toOld(android.graphics.Bitmap bitmap)
toOld
在接口中 IImageTools
bitmap
- public android.graphics.Bitmap decodeBitmap(java.lang.String path, int width, int heigth)
decodeBitmap
在接口中 IImageTools
path
- width
- heigth
- public android.graphics.BitmapFactory.Options decodeBitmap(java.lang.String path)
decodeBitmap
在接口中 IImageTools
path
- public android.graphics.Bitmap createAlbumArt(java.lang.String filePath)
createAlbumArt
在接口中 IImageTools
filePath
- 文件路径,like XXX/XXX/XX.mp3public int calculateInSampleSize(android.graphics.BitmapFactory.Options op, int reqWidth, int reqheight)
calculateInSampleSize
在接口中 IImageTools