9.png

.9.pngAndroid 9-Patch Image

Google · 2009

Developer
Google
Category
Images
MIME Type
image/png
First Released
2009
Open Format
Yes
File Signature
PNG signature: 89 50 4E 47 0D 0A 1A 0A
At a Glance
.9.png
Android 9-Patch Image

A special PNG image format used in Android development for creating scalable graphical assets.

Reviewed on May 22, 2026
Compression
Lossless (inherits from PNG)
Transparency
Yes
Editability
Medium
Best for
Scalable Android UI assets

Key Features

  • Defines scalable and stretchable regions for UI elements.
  • Supports different scaling behaviors (fixed, stretchable).
  • Optimized for Android's UI rendering engine.
  • Preserves standard PNG features like transparency.

Best For

  • Android UI development requiring scalable graphics.
  • Creating assets that need to stretch without distortion.
  • Maintaining image quality across different screen densities.
  • Designing reusable UI components for apps.

Less Ideal For

  • General web image use where standard PNG or JPG suffice.
  • Applications not targeting the Android platform.
  • Images that don't require any scaling or stretching.
  • Complex vector graphics that would benefit from SVG.

Common Use Cases

  • Creating scalable buttons and interactive UI elements.
  • Designing background images that adapt to various screen sizes.
  • Developing consistent graphical assets across diverse Android devices.
  • Implementing nine-patch graphics for complex layouts.

How to Open It

  1. Use the Android Studio's built-in editor for .9.png files.
  2. Open with image editors that support Android 9-patch editing, such as draw9patch (part of Android SDK tools).
  3. Standard PNG viewers can open them, but won't display the scaling information.
  4. Convert to a standard PNG if scaling information is not needed.

What is a .9.png file?

The .9.png file extension is a specialized format primarily used for Android application development. It's a PNG image with an extra bit of metadata that tells the Android system how to scale the image. This allows graphical assets, like buttons or backgrounds, to stretch and resize correctly across different screen densities and resolutions without distorting. Developers create these images using specific tools or by adding special markings to a standard PNG.

Programs That Open .9.png Files

PlatformProgram
WindowsAndroid StudioFreeOfficial
draw9patchFreeOfficial
macOSAndroid StudioFreeOfficial
draw9patchFreeOfficial
LinuxAndroid StudioFreeOfficial
draw9patchFreeOfficial

How to Convert .9.png Files

FormatMethod
.PNGAndroid Studio, draw9patch

Common Problems with .9.png Files

⚠️ Image does not scale correctly.
Ensure the 1-pixel border is correctly defined, specifying stretchable and padding regions. Verify that the image dimensions are appropriate for the intended use.
⚠️ Incorrect padding around content.
Adjust the padding lines (right and bottom border) in the 9-patch editor to control the space between the image content and its scaled edges.
⚠️ Black dots appear on image edges.
These dots indicate stretchable or padding regions. Ensure they are intentional and correctly placed. Remove them if they are accidental.

Frequently Asked Questions

What is a 9-patch image?

A 9-patch image is a PNG file used in Android development that contains metadata to control how the image is scaled and padded across different screen resolutions.

How is a 9-patch image different from a regular PNG?

A regular PNG is a static image. A 9-patch image has specific markings (defined in a 1-pixel border) that instruct the Android system on which areas can be stretched or padded, allowing it to adapt dynamically.

Can I use a .9.png on websites?

No, the .9.png format is specific to Android development and its scaling information is not interpreted by standard web browsers or image viewers.

Technical Details

A .9.png file is a standard PNG image with added '9-patch' metadata. This metadata is embedded within the image data itself, defining drawable areas and stretching guides. When rendered by the Android system, these guides dictate how the image should be scaled, ensuring it adapts appropriately to different screen sizes and densities without visual artifacts.

Did You Know?

The name '9-patch' comes from the conceptual grid of nine regions that the image can be divided into for scaling purposes.
These images are crucial for creating adaptive and responsive user interfaces in Android applications.

Security Information

As .9.png files are primarily image assets, they do not typically pose security risks beyond those associated with standard image formats. However, always ensure that images are sourced from trusted developers or repositories to avoid potential inclusion of malicious code if they were part of a larger asset package.

Related Extensions