当前位置: 首页>>代码示例>>Java>>正文


Java ImageSizeUtils.computeMinImageSampleSize方法代码示例

本文整理汇总了Java中com.nostra13.universalimageloader.utils.ImageSizeUtils.computeMinImageSampleSize方法的典型用法代码示例。如果您正苦于以下问题:Java ImageSizeUtils.computeMinImageSampleSize方法的具体用法?Java ImageSizeUtils.computeMinImageSampleSize怎么用?Java ImageSizeUtils.computeMinImageSampleSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.nostra13.universalimageloader.utils.ImageSizeUtils的用法示例。


在下文中一共展示了ImageSizeUtils.computeMinImageSampleSize方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepareDecodingOptions

import com.nostra13.universalimageloader.utils.ImageSizeUtils; //导入方法依赖的package包/类
protected Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo) {
	ImageScaleType scaleType = decodingInfo.getImageScaleType();
	int scale;
	if (scaleType == ImageScaleType.NONE) {
		scale = 1;
	} else if (scaleType == ImageScaleType.NONE_SAFE) {
		scale = ImageSizeUtils.computeMinImageSampleSize(imageSize);
	} else {
		ImageSize targetSize = decodingInfo.getTargetSize();
		boolean powerOf2 = scaleType == ImageScaleType.IN_SAMPLE_POWER_OF_2;
		scale = ImageSizeUtils.computeImageSampleSize(imageSize, targetSize, decodingInfo.getViewScaleType(), powerOf2);
	}
	if (scale > 1 && loggingEnabled) {
		L.d(LOG_SUBSAMPLE_IMAGE, imageSize, imageSize.scaleDown(scale), scale, decodingInfo.getImageKey());
	}

	Options decodingOptions = decodingInfo.getDecodingOptions();
	decodingOptions.inSampleSize = scale;
	return decodingOptions;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:BaseImageDecoder.java

示例2: prepareDecodingOptions

import com.nostra13.universalimageloader.utils.ImageSizeUtils; //导入方法依赖的package包/类
protected Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo) {
    int scale;
    ImageScaleType scaleType = decodingInfo.getImageScaleType();
    if (scaleType == ImageScaleType.NONE) {
        scale = 1;
    } else if (scaleType == ImageScaleType.NONE_SAFE) {
        scale = ImageSizeUtils.computeMinImageSampleSize(imageSize);
    } else {
        boolean powerOf2;
        ImageSize targetSize = decodingInfo.getTargetSize();
        if (scaleType == ImageScaleType.IN_SAMPLE_POWER_OF_2) {
            powerOf2 = true;
        } else {
            powerOf2 = false;
        }
        scale = ImageSizeUtils.computeImageSampleSize(imageSize, targetSize, decodingInfo.getViewScaleType(), powerOf2);
    }
    if (scale > 1 && this.loggingEnabled) {
        L.d(LOG_SUBSAMPLE_IMAGE, imageSize, imageSize.scaleDown(scale), Integer.valueOf(scale), decodingInfo.getImageKey());
    }
    Options decodingOptions = decodingInfo.getDecodingOptions();
    decodingOptions.inSampleSize = scale;
    return decodingOptions;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:25,代码来源:BaseImageDecoder.java

示例3: prepareDecodingOptions

import com.nostra13.universalimageloader.utils.ImageSizeUtils; //导入方法依赖的package包/类
protected Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo) {
    int scale;
    ImageScaleType scaleType = decodingInfo.getImageScaleType();
    if (scaleType == ImageScaleType.NONE) {
        scale = 1;
    } else if (scaleType == ImageScaleType.NONE_SAFE) {
        scale = ImageSizeUtils.computeMinImageSampleSize(imageSize);
    } else {
        boolean powerOf2;
        ImageSize targetSize = decodingInfo.getTargetSize();
        if (scaleType == ImageScaleType.IN_SAMPLE_POWER_OF_2) {
            powerOf2 = true;
        } else {
            powerOf2 = false;
        }
        scale = ImageSizeUtils.computeImageSampleSize(imageSize, targetSize, decodingInfo
                .getViewScaleType(), powerOf2);
    }
    if (scale > 1 && this.loggingEnabled) {
        L.d(LOG_SUBSAMPLE_IMAGE, imageSize, imageSize.scaleDown(scale), Integer.valueOf
                (scale), decodingInfo.getImageKey());
    }
    Options decodingOptions = decodingInfo.getDecodingOptions();
    decodingOptions.inSampleSize = scale;
    return decodingOptions;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:27,代码来源:BaseImageDecoder.java

示例4: prepareDecodingOptions

import com.nostra13.universalimageloader.utils.ImageSizeUtils; //导入方法依赖的package包/类
protected BitmapFactory.Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo) {
    ImageScaleType scaleType = decodingInfo.getImageScaleType();
    int scale;
    if (scaleType == ImageScaleType.NONE) {
        scale = 1;
    } else if (scaleType == ImageScaleType.NONE_SAFE) {
        scale = ImageSizeUtils.computeMinImageSampleSize(imageSize);
    } else {
        ImageSize targetSize = decodingInfo.getTargetSize();
        boolean powerOf2 = scaleType == ImageScaleType.IN_SAMPLE_POWER_OF_2;
        scale = ImageSizeUtils.computeImageSampleSize(imageSize, targetSize, decodingInfo.getViewScaleType(), powerOf2);
    }
    if (scale > 1 && loggingEnabled) {
        L.d(LOG_SUBSAMPLE_IMAGE, imageSize, imageSize.scaleDown(scale), scale, decodingInfo.getImageKey());
    }

    BitmapFactory.Options decodingOptions = decodingInfo.getDecodingOptions();
    decodingOptions.inSampleSize = scale;
    return decodingOptions;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:21,代码来源:DiskDecoder.java

示例5: prepareDecodingOptions

import com.nostra13.universalimageloader.utils.ImageSizeUtils; //导入方法依赖的package包/类
protected Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo) {
    ImageScaleType scaleType = decodingInfo.getImageScaleType();
    int scale;
    if (scaleType == ImageScaleType.NONE) {
        scale = 1;
    } else if (scaleType == ImageScaleType.NONE_SAFE) {
        scale = ImageSizeUtils.computeMinImageSampleSize(imageSize);
    } else {
        ImageSize targetSize = decodingInfo.getTargetSize();
        boolean powerOf2 = scaleType == ImageScaleType.IN_SAMPLE_POWER_OF_2;
        scale = ImageSizeUtils.computeImageSampleSize(imageSize, targetSize, decodingInfo.getViewScaleType(), powerOf2);
    }
    if (scale > 1 && loggingEnabled) {
        L.d(LOG_SUBSAMPLE_IMAGE, imageSize, imageSize.scaleDown(scale), scale, decodingInfo.getImageKey());
    }

    Options decodingOptions = decodingInfo.getDecodingOptions();
    decodingOptions.inSampleSize = scale;
    return decodingOptions;
}
 
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:21,代码来源:BaseImageDecoder.java

示例6: prepareDecodingOptions

import com.nostra13.universalimageloader.utils.ImageSizeUtils; //导入方法依赖的package包/类
protected Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo) {
	ImageScaleType scaleType = decodingInfo.getImageScaleType();
	int scale;
	if (scaleType == ImageScaleType.NONE) {
		scale = ImageSizeUtils.computeMinImageSampleSize(imageSize);
	} else {
		ImageSize targetSize = decodingInfo.getTargetSize();
		boolean powerOf2 = scaleType == ImageScaleType.IN_SAMPLE_POWER_OF_2;
		scale = ImageSizeUtils.computeImageSampleSize(imageSize, targetSize, decodingInfo.getViewScaleType(), powerOf2);
	}
	if (scale > 1 && loggingEnabled) {
		L.d(LOG_SUBSAMPLE_IMAGE, imageSize, imageSize.scaleDown(scale), scale, decodingInfo.getImageKey());
	}

	Options decodingOptions = decodingInfo.getDecodingOptions();
	decodingOptions.inSampleSize = scale;
	return decodingOptions;
}
 
开发者ID:x251089003,项目名称:EveryXDay,代码行数:19,代码来源:BaseImageDecoder.java

示例7: prepareDecodingOptions

import com.nostra13.universalimageloader.utils.ImageSizeUtils; //导入方法依赖的package包/类
protected Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo) {
	ImageScaleType scaleType = decodingInfo.getImageScaleType();
	int scale;
	if (scaleType == ImageScaleType.NONE) {
		scale = ImageSizeUtils.computeMinImageSampleSize(imageSize);
	} else {
		ImageSize targetSize = decodingInfo.getTargetSize();
		boolean powerOf2 = scaleType == ImageScaleType.IN_SAMPLE_POWER_OF_2;
		scale = ImageSizeUtils.computeImageSampleSize(imageSize, targetSize, decodingInfo.getViewScaleType(), powerOf2);
	}
	if (scale > 1 && loggingEnabled) {
		L.d(LOG_SABSAMPLE_IMAGE, imageSize, imageSize.scaleDown(scale), scale, decodingInfo.getImageKey());
	}

	Options decodingOptions = decodingInfo.getDecodingOptions();
	decodingOptions.inSampleSize = scale;
	return decodingOptions;
}
 
开发者ID:Apokrif,项目名称:morse,代码行数:19,代码来源:BaseImageDecoder.java

示例8: prepareDecodingOptions

import com.nostra13.universalimageloader.utils.ImageSizeUtils; //导入方法依赖的package包/类
protected android.graphics.BitmapFactory.Options prepareDecodingOptions(ImageSize imagesize, ImageDecodingInfo imagedecodinginfo)
{
    ImageScaleType imagescaletype = imagedecodinginfo.getImageScaleType();
    int i;
    android.graphics.BitmapFactory.Options options;
    if (imagescaletype == ImageScaleType.NONE)
    {
        i = ImageSizeUtils.computeMinImageSampleSize(imagesize);
    } else
    {
        ImageSize imagesize1 = imagedecodinginfo.getTargetSize();
        boolean flag;
        if (imagescaletype == ImageScaleType.IN_SAMPLE_POWER_OF_2)
        {
            flag = true;
        } else
        {
            flag = false;
        }
        i = ImageSizeUtils.computeImageSampleSize(imagesize, imagesize1, imagedecodinginfo.getViewScaleType(), flag);
    }
    if (i > 1 && loggingEnabled)
    {
        Object aobj[] = new Object[4];
        aobj[0] = imagesize;
        aobj[1] = imagesize.scaleDown(i);
        aobj[2] = Integer.valueOf(i);
        aobj[3] = imagedecodinginfo.getImageKey();
        L.d("Subsample original image (%1$s) to %2$s (scale = %3$d) [%4$s]", aobj);
    }
    options = imagedecodinginfo.getDecodingOptions();
    options.inSampleSize = i;
    return options;
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:35,代码来源:BaseImageDecoder.java


注:本文中的com.nostra13.universalimageloader.utils.ImageSizeUtils.computeMinImageSampleSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。