How to Create 9 Patch Images

May 4, 2013 | Rishabh Agrawal | General

A 9 patch image is an image that has stretchable areas defined.

These areas are defined in a special 1 pixel wide border around the area. Add black pixels to the top and left of this border to describe where the image can be stretched horizontally and vertically. Nine patch images are especially useful when designing buttons. Custom drawn buttons can look distorted and pixelated when their borders are stretched in addition to the rest of the image.

Procedure To Create:-

Making a 9 Patch image is a fairly easy process.Included as part of the Android SDK is a Draw 9 Patch utility. Navigate to the folder where you installed the SDK. From there navigate to the tools folder. Inside this folder will be the draw 9 patch program. On Windows, double click on draw9patch.bat

 

 

Once the Draw 9 Patch program has started, simply drag an image that you would like to edit onto the program.

 

 

After an image has been loaded into the Draw 9-Patch program two panes of information will appear. The left pane is used to edit the patches. The right pane shows what the image will look like when it is stretched in a couple of different ways.

 

 

You can think of the Draw 9 Patch program as a simple image editor, but you can only change the 1 pixel border and you can only use the color black.

Drawing the Patches

Draw along the top of the image to define the area that can be stretched horizontally.

Draw along the left side of the image to define the area that can be stretched vertically.

Draw along the bottom and the right of the image to define the padding.

Holding down shift and clicking will erase pixels.If you have the “Show Patches” option selected, then the stretchable area will be highlighted in pink.

 

 

 

Post By:- Manish Verma


THE AUTHORRishabh Agrawal

Rishabh Agrawal is the founder of Creatiosoft, a company focused on creating high-quality software for the iGaming industry, specialising in poker and card games. With years of experience, Rishabh is dedicated to delivering engaging and user-friendly gaming experiences. Through this blog, he shares his passion and insights to help readers understand the latest trends and advancements in iGaming.

Recent Posts

The Future of Mobile Gaming: What to Expect in the Next 5 Years

Over the years, mobile gaming has seen amazing development and innovation utilized by the game development company in India. It…
06 Jun 2023 Rishabh Agrawal

How Do I Get Started With NFT Gaming?

The popularity of the NFT game has created a different fan base. There was a time when games were a…
18 Jul 2022 Rishabh Agrawal

What Are The Top Trends in NFT Marketplace 2022?

The NFTs are the new engaging and revolutionary technology across the globe. Though, these non-fungible tokens appeared for the first…
09 Jun 2022 Rishabh Agrawal