com.nostra13.universalimageloader.core.process.BitmapProcessor Java Examples

The following examples show how to use com.nostra13.universalimageloader.core.process.BitmapProcessor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DemoActivity.java    From Masaccio with Apache License 2.0 6 votes vote down vote up
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();
}
 
Example #2
Source File: ImageHelper.java    From buddycloud-android with Apache License 2.0 5 votes vote down vote up
public static BitmapProcessor createRoundProcessor(final int roundPixels, 
		final boolean squareEnd, final int targetW) {
	return new BitmapProcessor() {
		
		@Override
		public Bitmap process(Bitmap arg0) {
			Bitmap newBitmap = getRoundedCornerBitmap(arg0, roundPixels, squareEnd, targetW);
			return newBitmap;
		}
	};
}
 
Example #3
Source File: ProcessAndDisplayImageTask.java    From WliveTV with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #4
Source File: ProcessAndDisplayImageTask.java    From BigApp_WordPress_Android with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #5
Source File: ImageLoaderConfiguration.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
public Builder diskCacheExtraOptions(int i1, int j1, BitmapProcessor bitmapprocessor)
{
    h = i1;
    i = j1;
    j = bitmapprocessor;
    return this;
}
 
Example #6
Source File: ImageLoaderConfiguration$Builder.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
public w diskCacheExtraOptions(int i1, int j1, BitmapProcessor bitmapprocessor)
{
    h = i1;
    i = j1;
    j = bitmapprocessor;
    return this;
}
 
Example #7
Source File: ProcessAndDisplayImageTask.java    From mobile-manager-tool with MIT License 5 votes vote down vote up
@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);
}
 
Example #8
Source File: ProcessAndDisplayImageTask.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #9
Source File: ProcessAndDisplayImageTask.java    From candybar with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #10
Source File: DemoActivity.java    From Masaccio with Apache License 2.0 5 votes vote down vote up
private static DisplayImageOptions getProcessorDisplayImageOptions(
        final BitmapProcessor processor) {

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

    return defaultOptionsBuilder.imageScaleType(ImageScaleType.NONE)
            .postProcessor(processor)
            .build();
}
 
Example #11
Source File: ProcessAndDisplayImageTask.java    From android-open-project-demo with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #12
Source File: ImageLoaderConfiguration.java    From android-open-project-demo with Apache License 2.0 4 votes vote down vote up
/**
 * @deprecated Use
 * {@link #diskCacheExtraOptions(int, int, com.nostra13.universalimageloader.core.process.BitmapProcessor)}
 * instead
 */
@Deprecated
public Builder discCacheExtraOptions(int maxImageWidthForDiskCache, int maxImageHeightForDiskCache,
		BitmapProcessor processorForDiskCache) {
	return diskCacheExtraOptions(maxImageWidthForDiskCache, maxImageHeightForDiskCache, processorForDiskCache);
}
 
Example #13
Source File: DisplayImageOptions.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public BitmapProcessor getPreProcessor()
{
    return o;
}
 
Example #14
Source File: DisplayImageOptions.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
static BitmapProcessor o(Builder builder)
{
    return builder.o;
}
 
Example #15
Source File: DisplayImageOptions.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
static BitmapProcessor p(Builder builder)
{
    return builder.p;
}
 
Example #16
Source File: DisplayImageOptions.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
static BitmapProcessor p(DisplayImageOptions displayimageoptions)
{
    return displayimageoptions.p;
}
 
Example #17
Source File: DisplayImageOptions.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public Builder postProcessor(BitmapProcessor bitmapprocessor)
{
    p = bitmapprocessor;
    return this;
}
 
Example #18
Source File: DisplayImageOptions.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public Builder preProcessor(BitmapProcessor bitmapprocessor)
{
    o = bitmapprocessor;
    return this;
}
 
Example #19
Source File: ImageLoaderConfiguration.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
static BitmapProcessor f(Builder builder)
{
    return builder.j;
}
 
Example #20
Source File: ImageLoaderConfiguration.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public Builder discCacheExtraOptions(int i1, int j1, BitmapProcessor bitmapprocessor)
{
    return diskCacheExtraOptions(i1, j1, bitmapprocessor);
}
 
Example #21
Source File: ImageLoaderConfiguration$Builder.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
static BitmapProcessor f(i i1)
{
    return i1.j;
}
 
Example #22
Source File: ImageLoaderConfiguration$Builder.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public diskCache discCacheExtraOptions(int i1, int j1, BitmapProcessor bitmapprocessor)
{
    return diskCacheExtraOptions(i1, j1, bitmapprocessor);
}
 
Example #23
Source File: DisplayImageOptions.java    From android-open-project-demo with Apache License 2.0 4 votes vote down vote up
public BitmapProcessor getPostProcessor() {
	return postProcessor;
}
 
Example #24
Source File: DisplayImageOptions.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 4 votes vote down vote up
public BitmapProcessor getPreProcessor() {
	return preProcessor;
}
 
Example #25
Source File: DisplayImageOptions.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 4 votes vote down vote up
public BitmapProcessor getPostProcessor() {
	return postProcessor;
}
 
Example #26
Source File: ImageLoaderConfiguration.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 4 votes vote down vote up
/**
 * @deprecated Use  该方法已经废弃使用
 * {@link #diskCacheExtraOptions(int, int, com.nostra13.universalimageloader.core.process.BitmapProcessor)}
 * instead
 */
@Deprecated
public Builder discCacheExtraOptions(int maxImageWidthForDiskCache, int maxImageHeightForDiskCache,
		BitmapProcessor processorForDiskCache) {
	return diskCacheExtraOptions(maxImageWidthForDiskCache, maxImageHeightForDiskCache, processorForDiskCache);
}
 
Example #27
Source File: DisplayImageOptions.java    From android-open-project-demo with Apache License 2.0 4 votes vote down vote up
public BitmapProcessor getPreProcessor() {
	return preProcessor;
}
 
Example #28
Source File: ImageLoaderConfiguration.java    From mobile-manager-tool with MIT License 4 votes vote down vote up
/**
 * @deprecated Use
 * {@link #diskCacheExtraOptions(int, int, com.nostra13.universalimageloader.core.process.BitmapProcessor)}
 * instead
 */
@Deprecated
public Builder discCacheExtraOptions(int maxImageWidthForDiskCache, int maxImageHeightForDiskCache,
		BitmapProcessor processorForDiskCache) {
	return diskCacheExtraOptions(maxImageWidthForDiskCache, maxImageHeightForDiskCache, processorForDiskCache);
}
 
Example #29
Source File: DisplayImageOptions.java    From candybar with Apache License 2.0 4 votes vote down vote up
public BitmapProcessor getPostProcessor() {
    return postProcessor;
}
 
Example #30
Source File: ImageLoaderConfiguration.java    From candybar with Apache License 2.0 4 votes vote down vote up
/**
 * @deprecated Use
 * {@link #diskCacheExtraOptions(int, int, com.nostra13.universalimageloader.core.process.BitmapProcessor)}
 * instead
 */
@Deprecated
public Builder discCacheExtraOptions(int maxImageWidthForDiskCache, int maxImageHeightForDiskCache,
                                     BitmapProcessor processorForDiskCache) {
    return diskCacheExtraOptions(maxImageWidthForDiskCache, maxImageHeightForDiskCache, processorForDiskCache);
}