Search code examples
androiduniversal-image-loaderpicassoandroid-bitmap

How to use universal image loader to download raw images WITHOUT DECODING


I want to download images with universal image loader but I do not want it to decode the images and create bitmap from it. I just want to save the original image in a directory. how can I disabling it to decode?
Can I use other libraries? for example picasso but I think it can not do that, am I right?


Solution

  • I think the answer would be:

        DisplayImageOptions options = new DisplayImageOptions.Builder()
        .imageScaleType(ImageScaleType.NONE)
        .build();
    

    because of:

    public enum ImageScaleType {
    /** Image won't be scaled */
    NONE,
    

    from

    https://github.com/nostra13/Android-Universal-Image-Loader/blob/master/library/src/com/nostra13/universalimageloader/core/assist/ImageScaleType.java#L24