Java 类com.nostra13.universalimageloader.core.download.ImageDownloader 实例源码

项目:GitHub    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:GifImageLoader    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:ImageLoaderSupportGif    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:MyTravelingDiary    文件:StickerManager.java   
public String getStickerBitmapUri(String categoryName, String stickerName) {
    StickerManager manager = StickerManager.getInstance();
    StickerCategory category = manager.getCategory(categoryName);
    if (category == null) {
        return null;
    }

    if (isSystemSticker(categoryName)) {
        if (!stickerName.contains(".png")) {
            stickerName += ".png";
        }

        String path = "sticker/" + category.getName() + "/" + stickerName;
        return ImageDownloader.Scheme.ASSETS.wrap(path);
    }

    return null;
}
项目:talk-android    文件:VideoRow.java   
Bitmap tryLoadBitmap(ImageViewAware imageAware) {
    Bitmap bitmap = null;
    try {
        java.io.File imageFile = diskCache.get(getMessage().get_id());
        if (imageFile != null && imageFile.exists() && imageFile.length() > 0) {
            ViewScaleType viewScaleType = imageAware.getScaleType();
            ImageSize imageSize = ImageSizeUtils.defineTargetSizeForView(imageAware, new ImageSize(MainApp.CONTEXT.getResources().getDisplayMetrics().widthPixels, MainApp.CONTEXT.getResources().getDisplayMetrics().heightPixels));
            ImageDecodingInfo decodingInfo = new ImageDecodingInfo(getMessage().get_id(),
                    ImageDownloader.Scheme.FILE.wrap(imageFile.getAbsolutePath()), getMessage().get_id(), imageSize, viewScaleType,
                    new BaseImageDownloader(MainApp.CONTEXT), options);
            bitmap = decoder.decode(decodingInfo);
            MainApp.memoryCache.put(getMessage().get_id(), bitmap);
        }
    } catch (Exception ignored) {
        ignored.printStackTrace();
    }
    return bitmap;
}
项目:yun2win-sdk-android    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:yun2win-sdk-android    文件:StickerManager.java   
public String getStickerBitmapUri(String categoryName, String stickerName) {
    StickerManager manager = StickerManager.getInstance();
    StickerCategory category = manager.getCategory(categoryName);
    if (category == null) {
        return null;
    }

    if (isSystemSticker(categoryName)) {
        if (!stickerName.contains(".png")) {
            stickerName += ".png";
        }

        String path = "sticker/" + category.getName() + "/" + stickerName;
        return ImageDownloader.Scheme.ASSETS.wrap(path);
    }

    return null;
}
项目:android-open-project-demo-master    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:mobile-manager-tool    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:BigApp_WordPress_Android    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:AyoSunny    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:WliveTV    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:EveryXDay    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:https-github.com-nostra13-Android-Universal-Image-Loader    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:CouldBooks    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:andoridDome    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:Android-Universal-Image-Loader-Modify    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:Nepenthes-Android    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:morse    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:OnTheRoad    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:danmaku-project    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:CEFCommon    文件:UIL.java   
@Nullable
public static String getUri(@Nullable File file) {
    if (file == null) return null;
    final String uri;
    if (file.exists()) {
        uri = ImageDownloader.Scheme.FILE.wrap(file.getAbsolutePath());
    } else {
        String name = file.getName();
        if (sAssets.contains(name)) {
            uri = ImageDownloader.Scheme.ASSETS.wrap(name);
        } else if (sApkExpansionZipFile != null && sApkExpansionZipFile.contains(name)) {
            uri = BaseImageDownloaderImpl.obbScheme + name;
        } else {
            Log.w(TAG, "File " + file.getAbsolutePath() + " doesn't exist on ext or assets!");
            uri = null;
        }
    }
    return uri;
}
项目:android-open-project-demo    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType,
                         ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;

    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;

    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();

    considerExifParams = displayOptions.isConsiderExifParams();
    decodingOptions = new Options();
    copyOptions(displayOptions.getDecodingOptions(), decodingOptions);
}
项目:GitHub    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}
项目:letv    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    if (this.engine.isNetworkDenied()) {
        return this.networkDeniedDownloader;
    }
    if (this.engine.isSlowNetwork()) {
        return this.slowNetworkDownloader;
    }
    return this.downloader;
}
项目:letv    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize targetSize, ViewScaleType viewScaleType, ImageDownloader downloader, DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;
    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;
    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();
    this.considerExifParams = displayOptions.isConsiderExifParams();
    copyOptions(displayOptions.getDecodingOptions(), this.decodingOptions);
}
项目:GifImageLoader    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}
项目:boohee_v5.6    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    if (this.engine.isNetworkDenied()) {
        return this.networkDeniedDownloader;
    }
    if (this.engine.isSlowNetwork()) {
        return this.slowNetworkDownloader;
    }
    return this.downloader;
}
项目:boohee_v5.6    文件:ImageDecodingInfo.java   
public ImageDecodingInfo(String imageKey, String imageUri, String originalImageUri, ImageSize
        targetSize, ViewScaleType viewScaleType, ImageDownloader downloader,
                         DisplayImageOptions displayOptions) {
    this.imageKey = imageKey;
    this.imageUri = imageUri;
    this.originalImageUri = originalImageUri;
    this.targetSize = targetSize;
    this.imageScaleType = displayOptions.getImageScaleType();
    this.viewScaleType = viewScaleType;
    this.downloader = downloader;
    this.extraForDownloader = displayOptions.getExtraForDownloader();
    this.considerExifParams = displayOptions.isConsiderExifParams();
    copyOptions(displayOptions.getDecodingOptions(), this.decodingOptions);
}
项目:ImageLoaderSupportGif    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}
项目:talk-android    文件:DiskDecoder.java   
protected ExifInfo defineExifOrientation(String imageUri) {
    int rotation = 0;
    boolean flip = false;
    try {
        ExifInterface exif = new ExifInterface(ImageDownloader.Scheme.FILE.crop(imageUri));
        int exifOrientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
        switch (exifOrientation) {
            case ExifInterface.ORIENTATION_FLIP_HORIZONTAL:
                flip = true;
            case ExifInterface.ORIENTATION_NORMAL:
                rotation = 0;
                break;
            case ExifInterface.ORIENTATION_TRANSVERSE:
                flip = true;
            case ExifInterface.ORIENTATION_ROTATE_90:
                rotation = 90;
                break;
            case ExifInterface.ORIENTATION_FLIP_VERTICAL:
                flip = true;
            case ExifInterface.ORIENTATION_ROTATE_180:
                rotation = 180;
                break;
            case ExifInterface.ORIENTATION_TRANSPOSE:
                flip = true;
            case ExifInterface.ORIENTATION_ROTATE_270:
                rotation = 270;
                break;
        }
    } catch (IOException e) {
        L.w("Can't read EXIF tags from file [%s]", imageUri);
    }
    return new ExifInfo(rotation, flip);
}
项目:yun2win-sdk-android    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}
项目:android-open-project-demo-master    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}
项目:mobile-manager-tool    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}
项目:BigApp_WordPress_Android    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}
项目:BigApp_WordPress_Android    文件:CommonUtils.java   
public static byte[] getImageByteByPath(String imagePath, ImageSize imageSize) {
    try {
        DisplayImageOptions options = new DisplayImageOptions.Builder()
                .cacheInMemory(false).cacheOnDisk(false)
                .considerExifParams(true).bitmapConfig(Bitmap.Config.RGB_565)
                .imageScaleType(ImageScaleType.EXACTLY).build();
        Bitmap upbitmap = ImageLoader.getInstance().loadImageSync(ImageDownloader.Scheme.FILE.wrap(imagePath), imageSize, options);
        if (upbitmap == null) {
            return null;
        }
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        upbitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);
        int option = 100;
        while (baos.toByteArray().length / 1024 > 120) {
            baos.reset();
            option -= 10;
            upbitmap.compress(Bitmap.CompressFormat.JPEG, option, baos);
        }
        byte[] result = baos.toByteArray();
        IoUtils.closeSilently(baos);
        upbitmap.recycle();
        return result;
    } catch (Throwable e) {
        e.printStackTrace();
    }
    return null;
}
项目:AyoSunny    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}
项目:MutiImage-Select-Camera    文件:Helper_Image.java   
public static void displayImage_local_string(String imgStr, ImageView image){
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .cacheInMemory(true)
            .showImageOnLoading(R.drawable.loading_bg_cn_2_1)
            .showImageOnFail(R.drawable.loading_fail_bg_cn_2_1)
            .showImageForEmptyUri(R.drawable.loading_none_bg_cn_2_1)
            .cacheOnDisk(true).considerExifParams(true)
            .imageScaleType(ImageScaleType.IN_SAMPLE_INT).resetViewBeforeLoading(true)
            .displayer(new FadeInBitmapDisplayer(FADEINTIME)).bitmapConfig(Bitmap.Config.RGB_565)
            .build();
    String imagePath = "/mnt/sdcard/image.png";
    String imageUrl = ImageDownloader.Scheme.FILE.wrap(imagePath);
    ImageLoader.getInstance().displayImage(imgStr, image, options);
}
项目:MutiImage-Select-Camera    文件:Helper_Image.java   
public static void displayImage_local_string(String string,ImageView image){
    DisplayImageOptions options = new DisplayImageOptions.Builder()
            .cacheInMemory(true)
            .showImageOnLoading(R.drawable.loading_bg_cn_2_1)
            .showImageOnFail(R.drawable.loading_fail_bg_cn_2_1)
            .showImageForEmptyUri(R.drawable.loading_none_bg_cn_2_1)
            .cacheOnDisk(true).considerExifParams(true)
            .imageScaleType(ImageScaleType.IN_SAMPLE_INT).resetViewBeforeLoading(true)
            .displayer(new FadeInBitmapDisplayer(FADEINTIME)).bitmapConfig(Bitmap.Config.RGB_565)
            .build();
    String imagePath = "/mnt/sdcard/image.png";
    String imageUrl = ImageDownloader.Scheme.FILE.wrap(imagePath);
    ImageLoader.getInstance().displayImage(string, image, options);
}
项目:WliveTV    文件:LoadAndDisplayImageTask.java   
private ImageDownloader getDownloader() {
    ImageDownloader d;
    if (engine.isNetworkDenied()) {
        d = networkDeniedDownloader;
    } else if (engine.isSlowNetwork()) {
        d = slowNetworkDownloader;
    } else {
        d = downloader;
    }
    return d;
}