public class GPUImage
extends java.lang.Object
| 修飾子とタイプ | クラスと説明 |
|---|---|
static interface |
GPUImage.OnPictureSavedListener |
static interface |
GPUImage.ResponseListener<T> |
static class |
GPUImage.ScaleType |
| コンストラクタと説明 |
|---|
GPUImage(android.content.Context context)
Instantiates a new GPUImage object.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
deleteImage()
Deletes the current image.
|
static void |
getBitmapForMultipleFilters(android.graphics.Bitmap bitmap,
java.util.List<GPUImageFilter> filters,
GPUImage.ResponseListener<android.graphics.Bitmap> listener)
Gets the images for multiple filters on a image.
|
android.graphics.Bitmap |
getBitmapWithFilterApplied()
Gets the current displayed image with applied filter as a Bitmap.
|
android.graphics.Bitmap |
getBitmapWithFilterApplied(android.graphics.Bitmap bitmap)
Gets the given bitmap with current filter applied as a Bitmap.
|
void |
requestRender()
Request the preview to be rendered again.
|
void |
saveToPictures(android.graphics.Bitmap bitmap,
java.lang.String folderName,
java.lang.String fileName,
GPUImage.OnPictureSavedListener listener)
非推奨です。
|
void |
saveToPictures(java.lang.String folderName,
java.lang.String fileName,
GPUImage.OnPictureSavedListener listener)
非推奨です。
|
void |
setFilter(GPUImageFilter filter)
Sets the filter which should be applied to the image which was (or will
be) set by setImage(...).
|
void |
setGLSurfaceView(android.opengl.GLSurfaceView view)
Sets the GLSurfaceView which will display the preview.
|
void |
setImage(android.graphics.Bitmap bitmap)
Sets the image on which the filter should be applied.
|
void |
setImage(java.io.File file)
Sets the image on which the filter should be applied from a File.
|
void |
setImage(android.net.Uri uri)
Sets the image on which the filter should be applied from a Uri.
|
void |
setRotation(Rotation rotation)
Sets the rotation of the displayed image.
|
void |
setScaleType(GPUImage.ScaleType scaleType)
This sets the scale type of GPUImage.
|
void |
setUpCamera(android.hardware.Camera camera)
Sets the up camera to be connected to GPUImage to get a filtered preview.
|
void |
setUpCamera(android.hardware.Camera camera,
int degrees,
boolean flipHorizontal,
boolean flipVertical)
Sets the up camera to be connected to GPUImage to get a filtered preview.
|
public GPUImage(android.content.Context context)
context - the contextpublic void setGLSurfaceView(android.opengl.GLSurfaceView view)
view - the GLSurfaceViewpublic void requestRender()
public void setUpCamera(android.hardware.Camera camera)
camera - the camerapublic void setUpCamera(android.hardware.Camera camera,
int degrees,
boolean flipHorizontal,
boolean flipVertical)
camera - the cameradegrees - by how many degrees the image should be rotatedflipHorizontal - if the image should be flipped horizontallyflipVertical - if the image should be flipped verticallypublic void setFilter(GPUImageFilter filter)
filter - the new filterpublic void setImage(android.graphics.Bitmap bitmap)
bitmap - the new imagepublic void setScaleType(GPUImage.ScaleType scaleType)
scaleType - The new ScaleTypepublic void setRotation(Rotation rotation)
rotation - new rotationpublic void deleteImage()
public void setImage(android.net.Uri uri)
uri - the uri of the new imagepublic void setImage(java.io.File file)
file - the file of the new imagepublic android.graphics.Bitmap getBitmapWithFilterApplied()
public android.graphics.Bitmap getBitmapWithFilterApplied(android.graphics.Bitmap bitmap)
bitmap - the bitmap on which the current filter should be appliedpublic static void getBitmapForMultipleFilters(android.graphics.Bitmap bitmap,
java.util.List<GPUImageFilter> filters,
GPUImage.ResponseListener<android.graphics.Bitmap> listener)
bitmap - the bitmap on which the filters will be appliedfilters - the filters which will be applied on the bitmaplistener - the listener on which the results will be notified@Deprecated
public void saveToPictures(java.lang.String folderName,
java.lang.String fileName,
GPUImage.OnPictureSavedListener listener)
GPUImageView.saveToPictures(String, String, jp.co.cyberagent.android.gpuimage.GPUImageView.OnPictureSavedListener)
Save current image with applied filter to Pictures. It will be stored on
the default Picture folder on the phone below the given folderName and
fileName. folderName - the folder namefileName - the file namelistener - the listener@Deprecated
public void saveToPictures(android.graphics.Bitmap bitmap,
java.lang.String folderName,
java.lang.String fileName,
GPUImage.OnPictureSavedListener listener)
GPUImageView.saveToPictures(String, String, jp.co.cyberagent.android.gpuimage.GPUImageView.OnPictureSavedListener)
Apply and save the given bitmap with applied filter to Pictures. It will
be stored on the default Picture folder on the phone below the given
folerName and fileName. bitmap - the bitmapfolderName - the folder namefileName - the file namelistener - the listener