background preloader

Images

Facebook Twitter

Aviary. Android Asset Studio - Simple Nine-patch Generator. Solving the Android image loading problem: Volley vs. Picasso. Jul 92013 The scrolling list of visuals is a classic mobile interface pattern. Unfortunately, it’s always been a hassle to implement well on Android. If they are stored locally, a native Android implementation will result in stuttering. And if they are stored on the web, you have to worry about canceling pending requests, along with caching and a slew of other concerns. As a result, many Android developers have written their own dedicated image downloading component once or twice. And when you start to need caching, transformations, and better performance, it’s natural to ask if someone else has solved this problem before you. But right around Google I/O, a couple of interesting new image libraries were introduced: Volley and Picasso.

The Setup: PhotoGallery PhotoGallery is a simple Flickr client that displays the most recent photos on Flickr: Scroll it down, and you’ll see more pictures. PhotoGalleryFragment has a component called ThumbnailDownloader. And that’s it. The Slickness: Picasso. How to get Picasa images via the Image Picker on Android devices | dimitar.me. How to get Picasa images using the Image Picker on Android devices running any OS version Using the Image Picker to get a local image from the Gallery is pretty easy and trivial task. But things get a lot more interesting if the user has a Picasa account and he/she happens to select an image from one of their Picasa albums. If you do not handle this scenario, your app will crash! And there is no way for you to tell the Image Picker to show just local files. So, you have to handle it, or you will be releasing a buggy application! Things got even more interesting after the release of Honeycomb!

1. (URI returned on devices running OS prior to 3.0) 2. (URI returned on devices running OS 3.0 and higher) I posted a brief solution on the official Android bug report site, but I will expand on it here. In order to properly handle fetching an image from the Gallery you need to handle three scenarios: 1. 1. 2. 3. Android - Deleting a gallery image after camera intent photo taken. Metadata-extractor - Extracts Exif, IPTC, XMP, ICC and other metadata from image files. Metadata-extractor is a straightforward Java library for reading metadata from image files.

Metadata metadata = ImageMetadataReader.readMetadata(imageFile); With that metadata object, you can iterate or query the various tag values that were read from the image. The library understands several formats of metadata, many of which may be present in a single image: It will process files of type: Special camera-specific data is decoded for most cameras manufactured by: Read GettingStarted for an introduction to the basics of using this library.

Mailing Lists Three mailing lists exist: metadata-extractor-announce for read-only announcements of new releases metadata-extractor-dev for discussion about development and notifications of changes to issues and source code metadata-extractor-changes for automated emails when code, issues or the wiki are changed. Credits This library is developed by Drew Noakes. Feedback Have questions? Found a bug or have a patch? Contribute. EXIF Orientation Handling Is a Ghetto. One of my favourite services at the moment is Transloadit, who provide an image processing API that works a treat on top of platforms like Heroku, where there are strict request timeout limits that make large uploads difficult. They handle auto-orientation of images automagically by default, and normally I’m not even aware of it happening during testing since my camera and OSX also handle auto-orientation transparently.

Recently one particular image stuck out on the staging server as un-rotated, while it worked fine locally using ImageMagick/Dragonfly. Not only that, but the width and height seemed to be wrong, warping the image (the app I’m working on uses a tiled layout, and requires the width and height of each image to be explicitly set in CSS). Eh? EXIF Orientation? The EXIF (exchangeable image file format) standard specifies a set of tags that can be embedded in images (among other things). This diagram from 80sidea explains the 8 orientations pretty succinctly: Sounds simple enough…