![]() ![]() Note that many modern devices don’t sit on exact density buckets (e.g. With the trend for devices with ever higher density screens, app makers must keep creating, including and shipping ever larger versions of the same assets. This is why on Android we need to provide multiple versions of each raster asset for different density screens:Īndroid picks the closest larger density and scales it down (if needed). Scaling raster assets down tends to be ok (as you’re discarding information) but scaling them up leads to artifacts like fuzziness or banding, because they have to interpolate the missing pixels.Īrtifacts from (extreme) scaling up a raster image (left) vs a vector image (right) Raster assets however can deteriorate when you resize them. Vector images resize gracefully because they describe the image over an abstract canvas size you can scale this canvas up or down and then redraw the image at that size. Vector assets have 3 main benefits, they are: #Vector Android 2.3.5 series#Vector graphics however describe the image as a series of shapes defined over an abstract canvas size. As such they’re defined at a particular resolution and don’t understand anything about their contents, just the color of each pixel. Most image formats (png, jpeg, bmp, gif, webp etc) are raster which means they describe the image as a fixed grid of pixels. #Vector Android 2.3.5 how to#But what exactly are they? What are their benefits? What are the costs? When should I use them? How do you create and use them? In this series of posts I’d like to explore these questions and explain why I think that the vast majority of the assets in your apps should be vectors, and how to get the most out of them. ![]() That’s why I’m a huge fan of using resolution independent, vector assets. Understanding Android’s vector image format: VectorDrawableĪndroid devices come in all sizes, shapes and screen densities. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |