Skip to content

Releases: bumptech/glide

Glide 3.7.0

24 Jan 21:44
Compare
Choose a tag to compare

Glide 3.7.0 is a minor feature/bugfix release.

Features

  • Add integration library for okhttp3 (#856, #887, #917)
  • Cancel pending requests in the okhttp3 library (#257)

Bugfixes

  • Fixed a memory leak loading GIFs (#690, #892)
  • Release all memory when clearMemory() is called (#687, #717)
  • Fix NoSuchMethodError on certain devices (#578)
  • Replace default user agent rather than appending default user agent when addHeader is called (#546)

Glide 3.6.1

28 Jun 21:37
Compare
Choose a tag to compare

Glide 3.6.1 is a minor bugfix release of the open source image loading library for Android focused on smooth scrolling.

Bugfixes

  • Apply Bitmap transformations to GIFs (#507)
  • Improve handling of webp images on certain platforms by adding default content encoding and user agent headers (#470)

Glide 3.6.0

01 May 20:24
Compare
Choose a tag to compare

Glide 3.6.0 is a bugfix and minor feature release of the open source image loading library for Android focused on smooth scrolling.

Features

Glide.get(context).clearDiskCache()
  • Add simpler DiskCacheFactory implementation (#430, thanks to @Tolriq)
glideBuilder.setDiskCache(new InternalDiskCacheFactory(context, 10 * 1024 * 1024));
// or:
glideBuilder.setDiskCache(new ExternalDiskCacheFactory(context, "cache_dir", 10 * 1024 * 1024));
  • Add a fallback drawable to display for null models (#268)
    Glide.with(context)
        .load(maybeNull)
        .placeholder(R.drawable.loading)
        .error(R.drawable.failed)
        .fallback(R.drawable.empty)
        .into(imageView)
  • Add a method to ViewTarget to globally set an id to use with setTag
public class FlickrGlideModule implements GlideModule {
    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        // Warning: This may cause memory leaks on versions of Android less than 4.0
        ViewTarget.setTagId(R.id.glide_tag_id);
    }
    ...
}
  • Allow requests to be paused/resumed recursively for Activities and/or Fragments and their child fragments (5210ba8, thanks to Paul)
Glide.with(getActivity()).pauseRequestsRecursive();
// And later:
Glide.with(getActivity()).resumeRequestsRecursive();
  • Add support for http headers to GlideUrl (fee6ed6, thanks to Ozzie)
// In your ModelLoader:
GlideUrl glideUrl = new GlideUrl("url", new LazyHeaders.Builder()
    .addHeader("key1", "value")
    .addHeader("key2", new LazyHeaderFactory() {
        @Override
        public String buildHeader() {
            String expensiveAuthHeader = computeExpensiveAuthHeader();
            return expensiveAuthHeader;
        }
    })
    .build())
  • Add somewhat more robust handling of uncaught exceptions (#435)
  • Add a custom request factory for the Volley integration library (3dcad68, thanks to Jason)

Build/Infrastructure

Bugs

  • Check the response code in OkHttp integration library (#315)
  • Fix a crash mutating SquaringDrawable (#349)
  • Removed an unnecessary anti alias flag in the paint used for default transformations (#366)
  • Fix an NPE when the disk cache directory could not be created (#374)
  • Fix a concurrent modification starting requests when other requests complete/fail (#375)
  • Ensure preload targets are always cleared (#385)
  • Handle reading/skipping less than expected data in ImageHeaderParser (#387)
  • Work around a framework bug decoding webp images from InputStreams by basing available() on the content length (#392)
  • Always obey custom cross fade duration (#398)
  • Work around a framework issue where media store thumbs are not rotated (#400)
  • Fix an NPE in RequestFutureTarget (#401, thanks to @Tolriq)
  • Avoid throwing exceptions when provided invalid resource ids (#413)
  • Improve the error message when asked to load the empty string (#415)
  • Fix a race in DecodeJob's cancel method (#424)
  • Fix a race where downloading the same url twice with difference keys using SOURCE or ALL could cause the load to fail (#427)
  • Fix a calculation error in Downsampler.AT_MOST (#434)
  • Make sure code style in OkHttp library is consistent (#397, thanks to @floating-cat)
  • Fix a bitmap re-use bug during cross fades (a9f80ea)

Glide 3.5.2

22 Feb 19:08
Compare
Choose a tag to compare

Glide 3.5.2 is a minor bug fix release.

Bugfixes

  • Fix a NPE on ComponentCallbacks (#329)
  • Fix an NPE caused by clearing the BitmapPool (#331)
  • Ensure requests started before the corresponding Fragment or Activity is started always run (#346)
  • Obey Target.ORIGINAL_SIZE when set via override() (#333)
  • Correctly parse JPEG image headers (#334)
  • Add an assertion when using a request builder as a thumbnail for itself (#330)

Performance

  • Avoid an unnecessary Bitmap allocation and reference when decoding most GIFs (e85cf30)
  • Increase the BitmapPool hit rate on KitKat and Lollipop when using multiple types of Bitmaps (#335)

Glide 3.5.1

30 Jan 16:19
Compare
Choose a tag to compare

Glide 3.5.1 is a bug fix release to fix a critical issue on 2.3 devices.

Bugfixes

  • Fix a crash on every request in Android 2.3 (#320)
  • Fix a race condition causing a crash (#322)
  • Fix a logged ClassCastException on the first request (#314)

Glide 3.5.0

25 Jan 22:46
Compare
Choose a tag to compare

Glide 3.5 is an incremental release containing a small number of new features and some significant bug fixes.

You can see a complete list of issues in the corresponding milestone.

Features

  • Add GlideModules for simple lazy configuration (#311).
  • Support for an original size (#274):
// You can override a view's size to request the original image:
Glide.with(context)
    .load(myUrl)
    .override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)
    .into(myImageVIew);

// SimpleTarget also now defaults to SIZE_ORIGINAL:
Glide.with(context)
    .load(myUrl)
    .into(new SimpleTarget<GlideDrawable>() {
        @Override
        public void onResourceReady(GlideDrawable drawable, GlideAnimation animation) {
            ...
        }
    });
  • Improved ListPreloader API, including an interface allowing different sizes per position thanks to @DavidWiesner (#273)
  • [ALPHA] AppWidget and Notification Target implementations thanks to @pavlospt (#242):
AppWidgetTarget widgetTarget = 
        new AppWidgetTarget(context, remoteViews, R.id.view_id, 300, 400, R.id.widget_id);

Glide.with(context)
    .asBitmap()
    .load(myUrl)
    .into(widgetTarget);
  • Override values are passed through to thumbnails (#236).
  • Automatically call trim/clear memory based on ComponentCallbacks (9063f6c).

Build/Infrastructure

  • Updated to Robolectric 2.4 thanks to @TWiStErRob (#249).
  • Updated to Android gradle plugin 1.0+ (ba32d32).
  • Added Intellij files for easier development (e34df44)

Bugs

Performance

  • Fixed needlessly copying Bitmaps decoded from data without an EXIF orientation tag (#270).
  • Freed thumbnails eagerly when full loads finish (#237).
  • Fixed a strict mode violation initializing the disk cache on Lollipop (#298).
  • Fixed a NetworkOnMainThread exception in the OkHttp integration library (#257)
  • Calculate sample size correctly thanks to @jisung (#288)

Rendering

  • Worked around a framework issue in KitKat and Lollipop causing certain types of Bitmaps to render old data (#301).
  • Fixed large BMPs failing to render (#283).
  • Fixed decode failure for images with minimal EXIF segments (#286).
  • Fixed a bug causing shared color filters (#276).

Other

  • Fixed a crash when the Glide singleton is instantiated on a background thread (#295).
  • Fixed a crash when completing loads started or cancelled other loads (#303).
  • Fixed skipMemoryCache not always skipping the memory cache (#258).

Glide 3.4.0

07 Nov 17:20
Compare
Choose a tag to compare

Glide 3.4 is an incremental release containing a number of new features and bugfixes. Animated GIFs were a significant focus of this release. We've substantially increased the number of GIFs that can be decoded successfully by our GifDecoder and fixed a variety of smaller issues with rendering and in our decoding pipeline in older versions of Android.

You can also see a complete list of issues in the corresponding milestone.

Features

  • Allow RequestBuilders to be re-used for multiple loads by introducing the .from() and .clone() APIs. These APIs allow users to set options on a request builder once, pass the builder to their adapters, and then start multiple loads with the single builder (#182).
// In your Activity/Fragment
@Override
public void onCreate(Bundle savedInstanceState) {
    DrawableRequestBuilder requestBuilder = 
        Glide.with(this)
           .from(String.class)
           .placeholder(R.drawable.spinner)
           .centerCrop()
           .crossFade();
    mAdapter = new MyAdapter(requestBuilder);
}

// In your Adapter
@Override
public View getView(int position, View convertView, ViewGroupParent parent) {
    ...
   mRequestBuilder.load(myUrls.get(position)).into(convertView);
}
Glide.setup(new GlideBuilder(context)
    .setDecodeFormat(DecodeFormat.ALWAYS_ARGB_8888));
  • Add a .preload() API to allow preloading media into memory (#169).
Glide.with(fragment)
    .load(url)
    .preload(width, height);
  • Add a .signature() API to allow users to easily mix in additional data to cache keys, giving users more control over cache invalidation (#178, #179), see the cache invalidation wiki.
Glide.with(fragment)
    .load(url)
    .signature(new StringSignature("Version1"))
    .into(view);
  • Add a Glide.preFillBitmapPool() API to allow pre-filling the BitmapPool to avoid jank from allocations after app startup (#93).
Glide.get(context)
    .preFillBitmapPool(new PreFillType.Builder(mySize));
  • Allow recursive calls to thumbnail() to load an arbitrary number of different sized thumbnails for a single Target (#149).
Glide.with(fragment)
    .load(myUrl)
    .thumbnail(Glide.with(fragment)
        .load(myUrl)
        .override(200, 200)
        .thumbnail(Glide.with(fragment)
           .load(myUrl)
           .override(50, 50)))
    .into(myView);
  • Allow thumbnail() to load model and data types that are different than those of the parent (#107).
  • Transformations are now only applied once and no longer have to be idempotent (#112).

Build/Infrastructure

  • PMD/Findbugs (#164)
  • Jacoco/Coveralls with 85% test coverage (34f797b).
  • Standard import order (f7a6d65).

Bugs

Performance

  • Avoid allocating large byte arrays in BufferedInputStream (#225).
  • Use downsampled image size when obtaining Bitmaps from the pool (#224).

GIFs

  • Avoid a crash causing race decoding multiple frames with the same GifDecoder (#212).
  • Always use ARGB_8888 to prevent null GIF frames on some versions of Android that don’t support ARGB_4444 (#216).
  • Fix partially decoded GIF frames (appears as grey or transparent noise in frames) (#207, #204).
  • Set a default frame delay for GIFs which do not specify a frame delay, or specify an overly short frame delay (#205).
  • More robust GIF decoding logic, including a fix for decoding only the first few rows of certain GIFs (#203).
  • Allow fade in/cross fade animations by ensuring that the first frame of GIFs is decoded before the GIF is returned (#159).
  • Fix GIFs always appearing transparent pre KitKat (#199).

Memory

  • Fix a memory leak when Glide is first called in an Activity (#210).

Transformations

  • Fix underdraw in FitCenter causing noise along the sides of certain images (#195).
  • Maintain transparency during bitmap transformations (#156).

Caching

  • Fixed Drawables being cached only be integer resource id which can change and/or overlap after subsequent compilations (#172).

Uris

  • Fix failure to detect certain types of file Uris (#161).

Other

  • Fix concurrency bugs resulting in incorrect assertions being thrown when loads were started on multiple threads (#191, #181).
  • Fix BitmapRequestBuilder not setting the decode format on the cache decoder when format() is called (#187).
  • Fix an assertion in ViewTarget related to restarting requests (#167).
  • Fix Glide.with() throwing pre Honeycomb when given non-support Activities (#158).
  • Avoid using Closeable interface when loading ParcelFileDescriptors on 4.1.1 or earlier (#157).
  • Fix an NPE in Bitmap#getAllocationByteCount() due to a framework bug in the initial release of KitKat (#148).

3.3.1 release

14 Sep 23:17
Compare
Choose a tag to compare

A bugfix release containing fixes for a number of bugs, a new sample app, and some code cleanup.

Bugfixes

Exceptions:

  • Fixes for double checked locking in singleton initialization: #115
  • Recursive entry to executePendingTransactions IllegalStateException: #117
  • Allow parsing of GIFs without Graphic Control Extensions before each frame: #134
  • Fixed restarting cancelled requests in onResume and/or connection changes: #128

Drawing issues:

  • Images disappearing after calls to setAlpha() or setColorFilter(): #118
  • Fixed images sometimes appearing skewed on Android 4.1.x: #129
  • Fixed transparent bitmaps sometimes being drawn on top of old content when re-using bitmaps: #131

Network issues:

  • Failing to follow http -> https redirects using the default HttpUrlFetcher: #119
  • Failing to load images at urls that use accent marks or special characters: #133
  • Better error handling for SocketTimeOutExceptions while decoding images using the default HttpUrlFetcher: #126

Features/Cleanup

Thanks to @TWiStErRob we've also:

  • Added SVG sample app demonstrating how to load custom resources with Glide (incubating feature).
  • Eliminated unused interfaces when loading custom resource types.
  • Cleaned up and reduced some duplication across the codebase.
  • Cleaned up a variety of test assertions.

3.3.0 Release

02 Sep 00:36
Compare
Choose a tag to compare

First release of the 3.3.0 branch.

2.0.5 Release

19 Jun 14:38
Compare
Choose a tag to compare

Fixes an issue where view dimensions weren't measured quickly enough causing images to fail to load.
Fixes an issue where loads for invalid Uris would throw exceptions instead of failing.