GithubHelp home page GithubHelp logo

webimageloader's People

Contributors

lexs avatar vbabiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webimageloader's Issues

Document the internal of webimageloader

I created the issues #8 and #9 because after deeply looking at the code I still can't understand all the internal mechanics.

Feeding the wiki with documentation about the internal code would imply more pull requests I guess. At least from me :)

Support redirects

Images that are being redirected fail to load.

Example:

Loading the URL http://api.twitter.com/1/users/profile_image?screen_name=bdesmet_&size=bigger fails with the following error message:

09-18 20:37:20.653: D/skia(16308): --- SkImageDecoder::Factory returned null
09-18 20:37:20.669: D/ImageHelper(16308): Error loading bitmap
09-18 20:37:20.669: D/ImageHelper(16308): java.io.IOException: Failed to create bitmap, decodeStream() returned null
09-18 20:37:20.669: D/ImageHelper(16308): at com.webimageloader.util.BitmapUtils.decodeStream(BitmapUtils.java:42)
09-18 20:37:20.669: D/ImageHelper(16308): at com.webimageloader.loader.PendingRequests$RequestListener.onStreamLoaded(PendingRequests.java:144)
09-18 20:37:20.669: D/ImageHelper(16308): at com.webimageloader.loader.NetworkLoader.loadInBackground(NetworkLoader.java:94)
09-18 20:37:20.669: D/ImageHelper(16308): at com.webimageloader.loader.BackgroundLoader$1.run(BackgroundLoader.java:22)
09-18 20:37:20.669: D/ImageHelper(16308): at com.webimageloader.concurrent.ListenerFuture.run(ListenerFuture.java:21)
09-18 20:37:20.669: D/ImageHelper(16308): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
09-18 20:37:20.669: D/ImageHelper(16308): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
09-18 20:37:20.669: D/ImageHelper(16308): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
09-18 20:37:20.669: D/ImageHelper(16308): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
09-18 20:37:20.669: D/ImageHelper(16308): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
09-18 20:37:20.669: D/ImageHelper(16308): at java.lang.Thread.run(Thread.java:856)
09-18 20:37:20.669: D/ImageHelper(16308): at com.webimageloader.util.PriorityThreadFactory$1.run(PriorityThreadFactory.java:26)

If you load the URL to which the first URL redirects (https://si0.twimg.com/profile_images/1593219329/333834_10150325451617266_569922265_8295088_379754916_o_bigger.jpg) everything works fine.

Allow to post xml with the request

Hi,

I think your api very cool. It solved all my problems to load images. Thank you very much for your contribuition.

But, I still need two little things to can use this API in my App. First, I need to verify the user permission to see the image. So my webservice is prepared to receive a XML post with the login details, to confirm permissions.

Something like this:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(requestURL);
StringEntity se = new StringEntity(requestXMLMessage, HTTP.ISO_8859_1);
se.setContentType(text/xml);
httppost.setEntity(se);

It is possible to add the usability on this custom request to load images?

Thank you very much,

Ricardo

Image from disk cache is without transparent background

Hi,

First I must say it's the best image loading library for android that I've found so far. Thanks for this awesome work!

I've tried to use it in my project, I'm using transformation to make the image rounded. Everything works amazing, but when the disk cache is enabled and the image being loaded from the cache, it's being displayed with black background instead of transparent background in the area that was clipped (attached picture).
image

Is it a configuration that I'm missing or a bug? BTW, in which format the image being saved in the cache, because if it's the same format as the original image and it doesn't support transparency, it might be the root for the problem.

Would love to get some help with that!
Thanks,
Lior

Use HttpResponseCache (or similar) instead of reimplementing HTTP caching

I noticed that you reimplement HTTP caching (respecting etags and other headers) when Android 4.0 and later does this for you - see https://developer.android.com/reference/android/net/http/HttpResponseCache.html
To support versions of Android before 4.0, you could use my library: https://github.com/candrews/httpresponsecache

I only point this out as implementing these parts of the HTTP protocol aren't easy, and I haven't examined your code terribly closely, but I'd be willing to bet it isn't up to feature parity or have as few bugs as the Android implementation. You could probably save yourself a lot of maintenance headache by reusing a library for this.

APIs for thread management

Hi, I noticed there is an API ImageLoader#destroy(). After calling that, I found the Disk related thread got shutdown. So I wanna know if there are other ways I can do to clean up all the background threads (observed via DDMS) when current app returns back to the Launcher ?

Thanks a lot.
Sean

Not possible to request images over HTTPS

The error occurs when trying to use a custom ConnectionFactory for HTTPS

I downloaded the code and found the error.
On constructor of class NetworkLoader is missing the code below
this.connectionFactory = builder.connectionFactory

Disk Cache not cacheing last image

Just playing about with this under no network conditions and it seems that the last item to be fetched by the loader doesn't get committed to the disk cache.

Steps to reproduce:

  1. Navigate to activity that uses webimageloader (e.g. listview activity)
  2. Exit to home screen and remove app from recents launcher to evict from memory
  3. Put phone into airplane mode
  4. Navigate back to activity in 1. All images are fetched except one (usually the last image in the list)

(ddms says ImageLoader: Error loading bitmap)

Packages and Eclipse

Hi... if I try to import the code of the directory "webimagloader" in eclipse as a "excisting Code Android Project" i get errors because your package-declaration "com.webimageloader" does not fit your directory-structure "main.java.com.webimageloader". This is necessary for eclipse. I wonder if i'm doing something wrong or maybe dont know something. Why do you have this structure? Greets, Mate

Not able to load certain URLs

If the URL have an %20, %2F or some other character like those, the image is not loaded.
Getting D/ImageHelper﹕ Error loading bitmap

A fix could be parse the URL to remove this characters.

Custom header attributes for request

To support e.g. https basic auth mechnism or addtional header attributes that are required to gain access to an image resource it should be possible to add custom header parameters to the request.

Pause async loader on scroll

Is there any way to pause the async tasks? Reason I ask, is to pause the background threads while scrolling as there's too much work being done as the images scroll by for a listview with large number of images.

So, on scroll, I would pause the work and on scroll stop, I would resume the work.

Thanks,
Bhaskar

Flag to ignore cache and force reload

Hi,

Like I said on the previous message, thanks for your contribution. Your code is one of the bests for me.

And, I have only one more issue with this code. I need to set some flag on the API to ignore cache and force the image reload.

Because, I have a form that the user can change the image (profile picture), and after the new upload I call the the API to open the image, but it returns the obsolete cache picture.

Can you please help me on that?

Thanks,

Ricardo

Bypass Cache

Is there any way to bypass the cache explicitly and force the image to be downloaded?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.