Tomo: A new image processing library for Android

Allan Yoshio Hasegawa
Android Frontier
3 min readJan 28, 2019

--

I have been developing for Android long enough to be part of the transition from the Holo Design era to this new Material Design era. I remember how the first apps with Material Design were sleek, clean and modern. But nowadays I feel this magic is gone. Apps following the Material Design feel generic, bland and with no identity.

I'm not saying Material Design is bad. There's a lot of awesome things in it, like the meaning behind animations, typography, the use of white space, and many more. The problem is that us, the developers, tend to keep it safe and use the default Material Design widgets without customizations.

To change things a little, I went on a mini quest to try to spice things up on my apps. Try giving it a little more identity. I started with an image processing library:

The inspiration

Most apps have a clean and solid color window background. However, I wanted a touch of elegance on my app. This means smooth and noticeable transitions between screens and a more immersive background.

I found my inspiration while using the Plex Web Player. It has an interesting background. It's multi-colored, but with no distinguishable detail. The color changes are soft, and there's a subtle noise pattern on top.

I wanted this background on my app!

Tomo

I didn't want a static background. I wanted to generate it dynamically so I could change it when the content on screen changes. I also didn't want the noise pattern to be low res. I wanted it to be perfect, actually, pixel perfect, because, even though it's noise, it needs to look beautiful.

That's why I built Tomo. It's a library capable of generating beautiful and elegant background based on any image. It supports dark and light theme. The resulting image is a pixel perfect image because it's processing the window rendered on the phone screen.

Here's the result:

Tomo Showcase

Performance

Tomo is fast. It's using Renderscript for most of its operations. Its pipeline of transformations is built to avoid memory re-allocation. Its resources are discarded as soon as they are not needed anymore.

Future of Tomo

While Tomo supports generating only a type of background now, Tomo has an expansible pipeline of transformations in its core. Adding new effects should not take long. I'll be exploring new effects in the future. If you have any requests, open an issue :)

Try it out!

The library is very easy to use and open-source. Also, it comes with a cool showcase app! Check it out: https://github.com/AllanHasegawa/Tomo

--

--