92 CHAPTER 3: An Introduction to the Android Application Development Platform
This menu sequence accesses the GIMP Scale Image dialog, shown in Figure 3-16, that allows us
to specify what image size to which we wish to scale our Image down. In this first case, this is a
144-pixel image, which we need for our /drawable-xxhdpi/ resource folder location.
Figure 3-16. The Scale Image dialog with the settings for XXHDPI on the left, and for XHDPI on the right
As you can see, you will need to choose an Interpolation Algorithm. In GIMP, the “Cubic” (known
as Bi-Cubic in Photoshop) interpolation algorithm will yield the highest quality level, so you will
always want to use this particular algorithm. This is why GIMP 2.8 has this set as its default
selection. GIMP 3.0 will be adding powerful new scaling algorithms, so make sure to get it when it
becomes available!
Once you set your scaling parameters, click the “Scale” button to commit the scaling operation, and
scale your 200-pixel source image into a 144-pixel extra extra high density Android device icon!
The technical term for scaling an image down in size is called “downsampling.” In this particular
case, we are downsampling an “indexed” or 8-bit color image, which is why you see the “GIMP
Lightbulb” notification at the bottom of the Scale Image dialog shown in Figure 3-16.
This notification tells us that our image (and thus its layers) is using 8-bit indexed color depth, and
that the Cubic interpolation will only affect RGB color channels (which we learn about in the graphic
design chapter) and layer masks (transparency or alpha channel data, which our current image
composite does indeed use). So we still need to specify Cubic since we are using a layer mask
(an area of transparency) in our floating layer!
We will learn more about digital image concepts and terminology in an upcoming chapter on graphic
design, where we will be creating “truecolor” PNG image assets and a truecolor application launcher
icon, so that you will have experience working with 8-bit color, 24-bit color, and 32-bit color imagery
in the Android OS.