Search in sources :

Example 1 with BitmapCompress

use of org.aisen.android.component.bitmaploader.core.BitmapCompress in project AisenWeiBo by wangdan.

the class VideoCompress method compress.

@Override
public MyBitmap compress(byte[] bitmapBytes, File file, String url, ImageConfig config, int origW, int origH) throws Exception {
    String id = KeyGenerator.generateMD5(url);
    VideoBean videoBean = SinaDB.getDB().selectById(null, VideoBean.class, id);
    if (videoBean != null) {
        MyBitmap myBitmap = new BitmapCompress().compress(bitmapBytes, file, url, config, origW, origH);
        if (myBitmap != null && myBitmap.getBitmap() != null) {
            return new VideoBitmap(myBitmap.getBitmap(), url, videoBean);
        }
    }
    return null;
}
Also used : BitmapCompress(org.aisen.android.component.bitmaploader.core.BitmapCompress) IBitmapCompress(org.aisen.android.component.bitmaploader.core.IBitmapCompress) MyBitmap(org.aisen.android.component.bitmaploader.core.MyBitmap) VideoBean(org.aisen.weibo.sina.support.bean.VideoBean)

Aggregations

BitmapCompress (org.aisen.android.component.bitmaploader.core.BitmapCompress)1 IBitmapCompress (org.aisen.android.component.bitmaploader.core.IBitmapCompress)1 MyBitmap (org.aisen.android.component.bitmaploader.core.MyBitmap)1 VideoBean (org.aisen.weibo.sina.support.bean.VideoBean)1