Java 类com.nostra13.universalimageloader.core.process.BitmapProcessor 实例源码

项目:oschina-app    文件:SoftwareDetailFragment.java   
private void fillUI() {
    mTvTitle.setText(mSoftware.getTitle());
    mTvLicense.setText(mSoftware.getLicense());
    mTvLanguage.setText(mSoftware.getLanguage());
    mTvOs.setText(mSoftware.getOs());
    mTvRecordTime.setText(mSoftware.getRecordtime());
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .cacheInMemory(true).cacheOnDisk(true)
            .postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).build();
    ImageLoader.getInstance().displayImage(mSoftware.getLogo(), mIvLogo,
            options);

    notifyFavorite(mSoftware.getFavorite() == 1);
}
项目:Masaccio    文件:DemoActivity.java   
private static ImageLoaderConfiguration getStandardOptions(final Context context,
                                                           final BitmapProcessor processor) {

    final ImageLoaderConfiguration.Builder config =
            new ImageLoaderConfiguration.Builder(context);

    config.defaultDisplayImageOptions(getProcessorDisplayImageOptions(processor));

    config.memoryCache(new WeakMemoryCache());
    config.taskExecutor(Executors.newCachedThreadPool());
    config.threadPriority(Thread.MIN_PRIORITY);
    config.imageDownloader(new OkHttpDownloader(context));
    config.writeDebugLogs();

    return config.build();
}
项目:ima_intellj    文件:SoftwareDetailFragment.java   
private void fillUI() {
    mTvTitle.setText(mSoftware.getTitle());
    mTvLicense.setText(mSoftware.getLicense());
    mTvLanguage.setText(mSoftware.getLanguage());
    mTvOs.setText(mSoftware.getOs());
    mTvRecordTime.setText(mSoftware.getRecordtime());
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .cacheInMemory(true).cacheOnDisk(true)
            .postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).build();
    ImageLoader.getInstance().displayImage(mSoftware.getLogo(), mIvLogo,
            options);

    notifyFavorite(mSoftware.getFavorite() == 1);
}
项目:GitHub    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:GifImageLoader    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:boohee_v5.6    文件:ImageLoaderConfiguration.java   
public Builder diskCacheExtraOptions(int maxImageWidthForDiskCache, int
        maxImageHeightForDiskCache, BitmapProcessor processorForDiskCache) {
    this.maxImageWidthForDiskCache = maxImageWidthForDiskCache;
    this.maxImageHeightForDiskCache = maxImageHeightForDiskCache;
    this.processorForDiskCache = processorForDiskCache;
    return this;
}
项目:ImageLoaderSupportGif    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:yun2win-sdk-android    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:Metapp    文件:PlaylistAdapter.java   
public View getView(final int position, View convertView, ViewGroup parent){
    Holder holder = new Holder();
    LayoutInflater li = LayoutInflater.from(context);

    PlaylistItem current = playlistItems.get(position);

    View itemView = li.inflate(R.layout.listitem_screeninvader, parent, false);
    holder.title = (TextView) itemView.findViewById(R.id.view_title);
    holder.timestamp = (TextView) itemView.findViewById(R.id.view_timestamp);
    holder.thumbnail = (ImageView) itemView.findViewById(R.id.view_thumbnail);

    holder.title.setText(current.title);
    if(current.category == "youtube") {holder.timestamp.setText(getDuration(current.source_url));}


    current.id = current.url.substring(current.url.length() - 11);
    String thumbnailUrl = String.format(YOUTUBE_THUMBNAIL_LINK, current.id);

    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .showImageForEmptyUri(R.drawable.ic_issues)
            .postProcessor(new BitmapProcessor() {
                @Override
                public Bitmap process(Bitmap bmp) {
                    return Bitmap.createScaledBitmap(bmp, dpToPx(71), dpToPx(40), false);
                }
            })
            .build();

    imageLoader.displayImage(thumbnailUrl, holder.thumbnail, options);

    itemView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            SIAPI.sendSICommand("/playlist/index", Integer.toString(position));
        }
    });
    return itemView;
}
项目:android-open-project-demo-master    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:mobile-manager-tool    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    com.nostra13.universalimageloader.core.DisplayBitmapTask displayBitmapTask = new com.nostra13.universalimageloader.core.DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:BigApp_WordPress_Android    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:AyoSunny    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:WliveTV    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:EveryXDay    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:https-github.com-nostra13-Android-Universal-Image-Loader    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:CouldBooks    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:andoridDome    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:MiBandDecompiled    文件:ImageLoaderConfiguration.java   
public Builder diskCacheExtraOptions(int i1, int j1, BitmapProcessor bitmapprocessor)
{
    h = i1;
    i = j1;
    j = bitmapprocessor;
    return this;
}
项目:MiBandDecompiled    文件:ImageLoaderConfiguration$Builder.java   
public w diskCacheExtraOptions(int i1, int j1, BitmapProcessor bitmapprocessor)
{
    h = i1;
    i = j1;
    j = bitmapprocessor;
    return this;
}
项目:Android-Universal-Image-Loader-Modify    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);
       //获取图片处理器 然后取得加载的图片
    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    //封装图片显示任务   其中图片来源设置成-来自内存缓存
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    //执行任务
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:oschina-app    文件:UserCenterAdapter.java   
public UserCenterAdapter(DislayModeChangeListener lis) {
    mStates.put(DisplayMode.ACTIVE, STATE_LESS_ONE_PAGE);
    mStates.put(DisplayMode.BLOG, STATE_LESS_ONE_PAGE);
    mStates.put(DisplayMode.INFOMATION, STATE_LESS_ONE_PAGE);
    mListener = lis;
    options = new DisplayImageOptions.Builder().cacheInMemory(true)
            .cacheOnDisk(true).postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).build();
}
项目:oschina-app    文件:DailyEnglishFragment.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    options = new DisplayImageOptions.Builder().cacheOnDisk(true)
            .cacheInMemory(true).postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).build();
}
项目:oschina-app    文件:SamplePagerAdapter.java   
SamplePagerAdapter(String[] images, OnPagerClickListener lis) {
    mListener = lis;
    this.images = images;
    options = new DisplayImageOptions.Builder().cacheInMemory(true)
            .postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).cacheOnDisk(true).build();
}
项目:Nepenthes-Android    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:Webo    文件:Configure.java   
public static DisplayImageOptions getWeiboImageDisplayImageOptions(
        BitmapProcessor postProcessor) {
    return new DisplayImageOptions.Builder()
            .showImageOnFail(R.drawable.weibo_image_holder)
            .showImageOnLoading(R.drawable.weibo_image_holder)
            .cacheOnDisk(true).postProcessor(postProcessor).build();
}
项目:morse    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    if (engine.configuration.writeLogs) L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);
    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    final Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine, LoadedFrom.MEMORY_CACHE);
    displayBitmapTask.setLoggingEnabled(engine.configuration.writeLogs);
    if (imageLoadingInfo.options.isSyncLoading()) {
        displayBitmapTask.run();
    } else {
        handler.post(displayBitmapTask);
    }
}
项目:appdeck-android    文件:Utils.java   
public static void downloadImage(String url, int maxHeight, SimpleImageLoadingListener listener, Context context)
  {
    AppDeck appDeck = AppDeck.getInstance();

    final int height = maxHeight;
    DisplayImageOptions options = appDeck.getDisplayImageOptionsBuilder()
      .preProcessor(new BitmapProcessor() {

    @Override
    public Bitmap process(Bitmap in) {
        // TODO Auto-generated method stub
            int width = in.getWidth() * height / in.getHeight();
            if (width > 0 && height > 0)
                return Bitmap.createScaledBitmap(in, width, height, true);
            return in;
    }
})
      .build();

      // Load image, decode it to Bitmap and return Bitmap to callback
      //appDeck.imageLoader.loadImage(url, options, listener);
      ImageSize targetSize = new ImageSize(0, 0);
      ImageView fakeImage = new ImageView(context);
      fakeImage.setLayoutParams(new LayoutParams(targetSize.getWidth(), targetSize.getHeight()));
      fakeImage.setScaleType(ScaleType.CENTER_CROP);
      appDeck.imageLoader.displayImage(url, fakeImage, options, new Utils.FakeImageSimpleImageLoadingListener(fakeImage, listener) {});        

  }
项目:appdeck-android    文件:Utils.java   
public static void downloadIcon(String url, final int maxHeight, SimpleImageLoadingListener listener, Context context)
  {
    AppDeck appDeck = AppDeck.getInstance();

    DisplayImageOptions options = appDeck.getDisplayImageOptionsBuilder()
      .preProcessor(new BitmapProcessor() {

    @Override
    public Bitmap process(Bitmap in) {
        // TODO Auto-generated method stub
            int height = maxHeight;
            int width = in.getWidth() * height / in.getHeight();
            if (width > 0 && height > 0)
                return Bitmap.createScaledBitmap(in, width, height, true);
            return in;
    }
})
      .build();

   // Load image, decode it to Bitmap and return Bitmap to callback
      ImageSize targetSize = new ImageSize(maxHeight, maxHeight); // result Bitmap will be fit to this size
      //appDeck.imageLoader.loadImage(url, targetSize, options, listener);

      ImageView fakeImage = new ImageView(context);
      fakeImage.setLayoutParams(new LayoutParams(targetSize.getWidth(), targetSize.getHeight()));
      fakeImage.setScaleType(ScaleType.CENTER_CROP);
      appDeck.imageLoader.displayImage(url, fakeImage, options, new Utils.FakeImageSimpleImageLoadingListener(fakeImage, listener) {});        

  }
项目:juahya    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    if (engine.configuration.loggingEnabled) L.i(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);
    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    final Bitmap processedBitmap = processor.process(bitmap);
    if (processedBitmap != bitmap) {
        bitmap.recycle();
    }
    handler.post(new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine));
}
项目:Masaccio    文件:DemoActivity.java   
private static DisplayImageOptions getProcessorDisplayImageOptions(
        final BitmapProcessor processor) {

    final DisplayImageOptions.Builder defaultOptionsBuilder = new DisplayImageOptions.Builder();

    return defaultOptionsBuilder.imageScaleType(ImageScaleType.NONE)
            .postProcessor(processor)
            .build();
}
项目:OnTheRoad    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:ima_intellj    文件:TweetAdapter.java   
public TweetAdapter() {
    options = new DisplayImageOptions.Builder().cacheInMemory(true)
            .cacheOnDisk(true).postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).build();
}
项目:ima_intellj    文件:ActiveAdapter.java   
public ActiveAdapter(){
    options = new DisplayImageOptions.Builder().cacheInMemory(true)
            .cacheOnDisk(true).postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).build();
}
项目:ima_intellj    文件:UserCenterAdapter.java   
public UserCenterAdapter(DislayModeChangeListener lis) {
    mStates.put(DisplayMode.ACTIVE, STATE_LESS_ONE_PAGE);
    mStates.put(DisplayMode.BLOG, STATE_LESS_ONE_PAGE);
    mStates.put(DisplayMode.INFOMATION, STATE_LESS_ONE_PAGE);
    mListener = lis;
    options = new DisplayImageOptions.Builder().cacheInMemory(true)
            .cacheOnDisk(true).postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).build();
}
项目:ima_intellj    文件:DailyEnglishFragment.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    options = new DisplayImageOptions.Builder().cacheOnDisk(true)
            .cacheInMemory(true).postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).build();
}
项目:ima_intellj    文件:ImagePreviewActivity.java   
SamplePagerAdapter(String[] images) {
    this.images = images;
    options = new DisplayImageOptions.Builder().cacheInMemory(true)
            .postProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap arg0) {
                    return arg0;
                }
            }).cacheOnDisk(true).build();
}
项目:ima_intellj    文件:AppContext.java   
public static void initImageLoader(Context context) {
    DisplayImageOptions displayOptions = new DisplayImageOptions.Builder()
            .preProcessor(new BitmapProcessor() {

                @Override
                public Bitmap process(Bitmap source) {
                    Bitmap target = getRoundedCornerBitmapBig(source);
                    if (source != target) {
                        source.recycle();
                    }
                    return target;
                }
            }).cacheInMemory(true).cacheOnDisk(true)
            .bitmapConfig(Config.ARGB_8888).build();
    // This configuration tuning is custom. You can tune every option, you
    // may tune some of them,
    // or you can create default configuration by
    // ImageLoaderConfiguration.createDefault(this);
    // method.
    ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
            context).threadPriority(Thread.NORM_PRIORITY - 2)
            .denyCacheImageMultipleSizesInMemory()
            .diskCacheFileNameGenerator(new Md5FileNameGenerator())
            .diskCacheSize(50 * 1024 * 1024)
            // 50 Mb
            .tasksProcessingOrder(QueueProcessingType.LIFO)
            .writeDebugLogs() // Remove for release app
            .defaultDisplayImageOptions(displayOptions).build();
    // Initialize ImageLoader with configuration.
    ImageLoader.getInstance().init(config);
}
项目:danmaku-project    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}
项目:android-open-project-demo    文件:ProcessAndDisplayImageTask.java   
@Override
public void run() {
    L.d(LOG_POSTPROCESS_IMAGE, imageLoadingInfo.memoryCacheKey);

    BitmapProcessor processor = imageLoadingInfo.options.getPostProcessor();
    Bitmap processedBitmap = processor.process(bitmap);
    DisplayBitmapTask displayBitmapTask = new DisplayBitmapTask(processedBitmap, imageLoadingInfo, engine,
            LoadedFrom.MEMORY_CACHE);
    LoadAndDisplayImageTask.runTask(displayBitmapTask, imageLoadingInfo.options.isSyncLoading(), handler, engine);
}