# Picasso

Picasso is an Android image downloading and caching library that loads images into applications and handles common image-loading tasks.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Callback leaks: cancel your Picasso requests!

DevFeed: [Callback leaks: cancel your Picasso requests!](<https://devfeed.tech/articles/callback-leaks-cancel-your-picasso-requests-25620.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/callback-leaks-cancel-your-picasso-requests>)

Author: Pierre-Yves Ricau

Published: 2023-01-17T21:06:14Z

Content type: article

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Picasso](<https://devfeed.tech/topics/picasso.md>), [leakcanary](<https://devfeed.tech/topics/leakcanary.md>), [callback](<https://devfeed.tech/topics/callback.md>)

Tags: [actions](<https://devfeed.tech/tags/actions.md>), [adapter](<https://devfeed.tech/tags/adapter.md>), [also](<https://devfeed.tech/tags/also.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-engineer](<https://devfeed.tech/tags/android-engineer.md>), [article](<https://devfeed.tech/tags/article.md>), [block](<https://devfeed.tech/tags/block.md>), [callback](<https://devfeed.tech/tags/callback.md>), [engineer](<https://devfeed.tech/tags/engineer.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [i](<https://devfeed.tech/tags/i.md>), [leak](<https://devfeed.tech/tags/leak.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [leaks](<https://devfeed.tech/tags/leaks.md>), [learn](<https://devfeed.tech/tags/learn.md>), [look](<https://devfeed.tech/tags/look.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [performance](<https://devfeed.tech/tags/performance.md>), [picasso](<https://devfeed.tech/tags/picasso.md>), [this](<https://devfeed.tech/tags/this.md>), [top](<https://devfeed.tech/tags/top.md>), [work](<https://devfeed.tech/tags/work.md>)

### AI overview

A Picasso request can keep a detached UI component from being garbage collected when its custom callback captures the component and the request remains in flight. Picasso's singleton holds weak references to target views but strong references to actions; the action and callback can therefore retain the detached view. Cancel requests when the UI goes away to prevent the leak and avoid continued resource use while loading. The excerpt also says Picasso automatically cancels a previous request when a new image is loaded into the same ImageView, which helps with recycled adapter views. It cuts off during that explanation, so it does not establish the full set of circumstances in which leaks are avoided.

### Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block. Every month I organize an internal Ensemble Leak Hunting session where we look at the top leaks reported by LeakCanary to learn how to read

## Android Image Loading at SoundCloud

DevFeed: [Android Image Loading at SoundCloud](<https://devfeed.tech/articles/android-image-loading-at-soundcloud-1986.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//android-images-at-soundcloud>)

Published: 2022-10-13T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Picasso](<https://devfeed.tech/topics/picasso.md>), [Image](<https://devfeed.tech/topics/image.md>), [Android](<https://devfeed.tech/topics/android.md>), [recyclerview](<https://devfeed.tech/topics/recyclerview.md>), [Image processing](<https://devfeed.tech/topics/image-processing.md>), [animations](<https://devfeed.tech/topics/animations.md>), [constraintlayout](<https://devfeed.tech/topics/constraintlayout.md>), [Android Testing](<https://devfeed.tech/topics/android-testing.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [about](<https://devfeed.tech/tags/about.md>), [adapter](<https://devfeed.tech/tags/adapter.md>), [added](<https://devfeed.tech/tags/added.md>), [all](<https://devfeed.tech/tags/all.md>), [also](<https://devfeed.tech/tags/also.md>), [android](<https://devfeed.tech/tags/android.md>), [animate](<https://devfeed.tech/tags/animate.md>), [animation](<https://devfeed.tech/tags/animation.md>), [app](<https://devfeed.tech/tags/app.md>), [design](<https://devfeed.tech/tags/design.md>), [image](<https://devfeed.tech/tags/image.md>), [images](<https://devfeed.tech/tags/images.md>), [loading](<https://devfeed.tech/tags/loading.md>), [me](<https://devfeed.tech/tags/me.md>), [new-year](<https://devfeed.tech/tags/new-year.md>), [picasso](<https://devfeed.tech/tags/picasso.md>), [remarkable](<https://devfeed.tech/tags/remarkable.md>), [team](<https://devfeed.tech/tags/team.md>), [thing](<https://devfeed.tech/tags/thing.md>), [type](<https://devfeed.tech/tags/type.md>)

### AI overview

SoundCloud traced slower image loading and flicker after its Android redesign to several causes. It replaced bitmap keys in its palette cache with image URL strings, and sped up palette generation by shrinking 500x500 bitmaps to 15x15 and requesting fewer colors, trading some color accuracy for speed. Picasso animations were limited to network-loaded images and shortened from 200 ms to 60 ms; cached images display directly. The app also preloads three upcoming RecyclerView images, with checks to avoid duplicate, visible, out-of-range, or incompatible items. Stacked playlist images caused GPU overdraw. A custom drawing approach showed how to draw only visible bitmap areas, but the complete implementation proved complex to maintain and showed no performance benefit, so it was excluded. The excerpt emphasizes measuring UI performance during redesigns.

### Source excerpt

The SoundCloud Android app recently got a significant makeover: a "new year, new me" type of thing. Our remarkable design team and...

## Slope-intercept library design

DevFeed: [Slope-intercept library design](<https://devfeed.tech/articles/slope-intercept-library-design-20972.md>)

Original publisher: [Read original article](<https://jakewharton.com/slope-intercept-library-design/>)

Published: 2022-04-05T00:00:00Z

Content type: opinion

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>)

Topics: [Library](<https://devfeed.tech/topics/library.md>), [Picasso](<https://devfeed.tech/topics/picasso.md>), [Android](<https://devfeed.tech/topics/android.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Scala](<https://devfeed.tech/topics/scala.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [http](<https://devfeed.tech/tags/http.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [library](<https://devfeed.tech/tags/library.md>), [picasso](<https://devfeed.tech/tags/picasso.md>)

### AI overview

The article proposes using slope-intercept form as a way to evaluate library design. The intercept represents the initial learning and setup cost, while the slope represents how complexity changes as requirements grow. It compares Picasso, Retrofit, and Dagger to show how libraries can trade a low initial barrier for steeper long-term complexity, or require more conceptual investment up front to remain easier to extend.

### Source excerpt

The equation y=mx+b defines a line in slope-intercept form. The line will intercept the y-axis at the value b and for each change in x its slope (the amount the line goes up or down) will change by m. Slope-intercept gives me a way to think about the design of libraries in relation to each other. The intercept is the initial cost of learning and setup for a library, and the slope is how the library's complexity changes over time. There's no real units here and the values are entirely subjective. Let's try it! Picasso Exactly 10 years ago today I introduced Picasso internally at Square. As an image loading library for Android, its primary selling point was a low intercept. It required no real configuration and only one line of code (even in a ListView adapter). Picasso.with(context).load("https://...").into(imageView); At the time this was a refreshing change from the existing libraries which required a lot of up-front and per-request configuration. The downside, however, was that as your needs grow the slope of complexity also grows faster than desired. Configuring the global instance, managing multiple instances, intercepting requests, and transforming images are all possible but more difficult than if the library was designed differently. Retrofit Retrofit is a declarative HTTP client abstraction for the JVM and Android. It requires configuration of a central object before you can use it to create instances of service interfaces. interface GitHubService { @GET("users/{user}/repos") Call<List<Repo>> listRepos(@Path("user") String user); } var retrofit = new Retrofit.Builder() .baseUrl("https://api.github.com/") .addConverter(MoshiJsonConverter.create()) .build(); var service = retrofit.create(GitHubService.class); This up-front configuration gives Retrofit a higher intercept on the y-axis. Exposure to these APIs gives you an entrypoint to discover functionality and encourages you to manage their lifetimes in an efficient way for your usage allowing the slope of com

## Welcome to the (Color) Matrix

DevFeed: [Welcome to the (Color) Matrix](<https://devfeed.tech/articles/welcome-to-the-color-matrix-15957.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/welcome-to-the-color-matrix>)

Author: P-Y Ricau

Published: 2015-12-09T17:10:00Z

Content type: article

Language: en

Sources: [Square Corner](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [image effects](<https://devfeed.tech/topics/image-effects.md>), [Image processing](<https://devfeed.tech/topics/image-processing.md>), [color](<https://devfeed.tech/topics/color.md>), [Picasso](<https://devfeed.tech/topics/picasso.md>)

Tags: [color](<https://devfeed.tech/tags/color.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [images](<https://devfeed.tech/tags/images.md>), [matrix](<https://devfeed.tech/tags/matrix.md>), [picasso](<https://devfeed.tech/tags/picasso.md>)

### AI overview

The article develops an Android image tinting approach with Picasso and ColorMatrix transformations. A translucent color layer lets original colors bleed through, while a grayscale image multiplied by the target RGB tint avoids that issue but leaves blacks dark and contrast strong. The author then scales and shifts grayscale values around the target color to preserve image detail with softer contrast, and adjusts the contrast scale to 1 minus the target color's relative luminance. For readable overlay text, the example uses ColorUtils to calculate minimum alpha for white text, falling back to black. The author describes this as an empirical solution and invites feedback.

### Source excerpt

Combining Picasso with color matrices to transform images.

## Coercing Picasso To Play With Palette

DevFeed: [Coercing Picasso To Play With Palette](<https://devfeed.tech/articles/coercing-picasso-to-play-with-palette-20923.md>)

Original publisher: [Read original article](<https://jakewharton.com/coercing-picasso-to-play-with-palette/>)

Published: 2014-10-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>)

Topics: [Picasso](<https://devfeed.tech/topics/picasso.md>), [Image](<https://devfeed.tech/topics/image.md>), [API](<https://devfeed.tech/topics/api.md>), [Library](<https://devfeed.tech/topics/library.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [image](<https://devfeed.tech/tags/image.md>), [library](<https://devfeed.tech/tags/library.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [picasso](<https://devfeed.tech/tags/picasso.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>)

### AI overview

This article explores how to adapt Picasso's existing APIs to work with the Palette library before direct support is available. It focuses on Bitmap handling, callback behavior, and Picasso's threading model for performing Palette computation without blocking the Android main thread.

### Source excerpt

Features feel how I imagine children would. They are relatively easy to spawn but require a lengthy committment and constant care. Picasso's API would be nothing short of a Greek tragedy if we humored every feature request that we received. Finding the right balance of what is appropriate to add and what isn't is a constant struggle. When the Palette library was teased the inevitable feature request came in to Picasso for a means of supporting it. This was certainly not an unreasonable request, and while we might not explicitly support it directly we will probably add something in the future to more easily facilitate its use. But what do we do in the interim? The API for proper support is many months if not a year away from actually being implemented. Let's walk through an attempt to adapt the existing APIs to allow Palette's use. The fundamental component of Picasso's data pipeline after the request has been fulfilled is a Bitmap. We use this in the return values and method parameters which traverse upwards to the main thread. Bitmap is a final class in Android so we will not get an opportunity to hang extra metadata on a subclass. There are two ways that Picasso can notify the caller of a successful image download: the Callback when loading directly into an ImageView or the more generalized Target. A Target is given direct access to the Bitmap object but the Callback is not (although you can get it indirectly with some cleverness). Regardless of Bitmap access is the problem that both of these are called on the main thread. Since Palette does a decent amount of computation we don't want to do it here anyways. Palette actually has an asynchronous mode of operation that we could leverage in these two callback locations but you wouldn't want to. The images are ready to be displayed when the callbacks are invoked so either delaying display until you can run Palette on another background thread or displaying the image right away and getting the Palette information later

## Hello Picasso 2.3

DevFeed: [Hello Picasso 2.3](<https://devfeed.tech/articles/hello-picasso-2-3-15672.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/hello-picasso-2-3>)

Author: Square Engineering

Published: 2014-05-30T16:06:00Z

Content type: release

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>), [Square Corner](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [Picasso](<https://devfeed.tech/topics/picasso.md>), [Android](<https://devfeed.tech/topics/android.md>), [API](<https://devfeed.tech/topics/api.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [API Logging](<https://devfeed.tech/topics/api-logging.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apis](<https://devfeed.tech/tags/apis.md>), [caching](<https://devfeed.tech/tags/caching.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [picasso](<https://devfeed.tech/tags/picasso.md>), [request](<https://devfeed.tech/tags/request.md>)

### AI overview

Picasso 2.3 adds automatic replay of failed image requests when network connectivity returns, with no setup required; the dispatcher coordinates this work while keeping the main thread focused on starting or canceling requests. Replay also applies to widget and notification requests through the expanded RemoteViews API. Optional logging records pipeline stages, request IDs, elapsed times, and metrics such as bitmap transformation time, which can help trace requests. Logging must be enabled explicitly because its detailed output slows app performance. The excerpt also mentions cache control and support for large image-heavy UIs as features under consideration, not released capabilities.

### Source excerpt

Request replaying and new APIs

## Enhance Your Application Using Picasso

DevFeed: [Enhance Your Application Using Picasso](<https://devfeed.tech/articles/enhance-your-application-using-picasso-15627.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/enhance-your-application-using-picasso>)

Author: Square Engineering

Published: 2013-05-14T16:03:00Z

Content type: article

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>), [Square Corner](<https://devfeed.tech/sources/square-corner-blog-medium.md>)

Topics: [Picasso](<https://devfeed.tech/topics/picasso.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Android](<https://devfeed.tech/topics/android.md>), [Image](<https://devfeed.tech/topics/image.md>)

Tags: [adapter](<https://devfeed.tech/tags/adapter.md>), [android](<https://devfeed.tech/tags/android.md>), [automatically](<https://devfeed.tech/tags/automatically.md>), [caching](<https://devfeed.tech/tags/caching.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [fluent](<https://devfeed.tech/tags/fluent.md>), [image](<https://devfeed.tech/tags/image.md>), [library](<https://devfeed.tech/tags/library.md>), [picasso](<https://devfeed.tech/tags/picasso.md>), [recycling](<https://devfeed.tech/tags/recycling.md>), [square](<https://devfeed.tech/tags/square.md>), [transformation](<https://devfeed.tech/tags/transformation.md>)

### AI overview

Picasso is an Android library for downloading and displaying images with a short fluent call. It handles caching, view recycling, and placing the finished bitmap in the target view, including when loading images in an adapter. Its resize and center-crop transformations run on the background thread used to decode the source, and the transformed result is stored in memory so different versions of the same image can be reused. Picasso uses memory caching and disk caching provided by the HTTP client; a development marker can show the image source.

### Source excerpt

A fluent image downloading and caching library for Android.

## Bezier Curves and Picasso

DevFeed: [Bezier Curves and Picasso](<https://devfeed.tech/articles/bezier-curves-and-picasso-40317.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/05/11/bezier-curves-and-picasso/>)

Published: 2013-05-11T00:32:05Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Picasso](<https://devfeed.tech/topics/picasso.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [art](<https://devfeed.tech/tags/art.md>), [bezier-curves](<https://devfeed.tech/tags/bezier-curves.md>), [de-casteljau](<https://devfeed.tech/tags/de-casteljau.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [interactive](<https://devfeed.tech/tags/interactive.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [math](<https://devfeed.tech/tags/math.md>), [painting](<https://devfeed.tech/tags/painting.md>), [picasso](<https://devfeed.tech/tags/picasso.md>), [polynomials](<https://devfeed.tech/tags/polynomials.md>), [programming](<https://devfeed.tech/tags/programming.md>), [svg](<https://devfeed.tech/tags/svg.md>)

### AI overview

This tutorial explains Bezier curves through the mathematical ideas behind parameterized curves, then presents a simple algorithm and JavaScript implementation for drawing them. It applies the method to recreate one of Pablo Picasso's line drawings as a sequence of Bezier curves.

### Source excerpt

Pablo Picasso Simplicity and the Artist Some of my favorite of Pablo Picasso's works are his line drawings. He did a number of them about animals: an owl, a camel, a butterfly, etc. This piece called "Dog" is on my wall: Dachshund-Picasso-Sketch (Jump to interactive demo where we recreate "Dog" using the math in this post) These paintings are extremely simple but somehow strike the viewer as deeply profound. They give the impression of being quite simple to design and draw.