FileDocCategorySizeDatePackage
ImageEncoder.javaAPI DocAndroid 5.1 API1773Thu Mar 12 22:22:30 GMT 2015android.filterpacks.imageproc

ImageEncoder

public class ImageEncoder extends android.filterfw.core.Filter
hide

Fields Summary
private OutputStream
mOutputStream
private int
mQuality
Constructors Summary
public ImageEncoder(String name)


       
        super(name);
    
Methods Summary
public voidprocess(android.filterfw.core.FilterContext env)

        Frame input = pullInput("image");
        Bitmap bitmap = input.getBitmap();
        bitmap.compress(CompressFormat.JPEG, mQuality, mOutputStream);
    
public voidsetupPorts()

        addMaskedInputPort("image", ImageFormat.create(ImageFormat.COLORSPACE_RGBA,
                                                       FrameFormat.TARGET_UNSPECIFIED));