[android-developers] Re: Creating 9-patch Images on Device

2011-04-03 Thread Nicholas Johnson
It shouldn't be too difficult. If you have a byte stream of the bitmap, then just set the pixels on the first/last row/col to black where you want to stretch the image and set the other pixels to zero. Then you could remain the image *.9.png and then load it as a normal 9 patch drawable resource

[android-developers] Re: Creating 9-patch Images on Device

2011-04-03 Thread Matt M
Nick, Thank you for your thoughts. I hoped it would be that easy as well, however according to this discussion: https://groups.google.com/group/android-developers/browse_thread/thre... Romain Guy states "There's a compilation phase to embed extra information inside the PNG but it happens in aapt

[android-developers] Re: Creating 9-patch Images on Device

2011-04-03 Thread Matt M
Sorry, this discussion: https://groups.google.com/group/android-developers/browse_thread/thread/22f402ccedba9533 Also, this link is the ResourceTypes.h file that describes (sort of) how to manage the byte[] chunk. I've studied it I just do not know what to return exactly. http://www.netmite.com/a

[android-developers] Re: Creating 9-patch Images on Device

2011-04-03 Thread Nicholas Johnson
Ah, ok, I hadn't read that at all. By the way, what are you doing with the image that you need to make it a 9 patch? Perhaps you can use a matrix to scale it however you need before displaying it? Nick -- You received this message because you are subscribed to the Google Groups "Android Devel

[android-developers] Re: Creating 9-patch Images on Device

2011-04-03 Thread Matt M
I was looking at 9patch because the images are being displayed on a home screen widget. They are designed for portrait display, so when orientation is changed to landscape the widget looks a bit distorted. If 9patch on device is possible that seems like the most efficient method, however if there i

[android-developers] Re: Creating 9-patch Images on Device

2011-04-03 Thread skink
On Apr 4, 4:44 am, Matt M wrote: > I was looking at 9patch because the images are being displayed on a > home screen widget. They are designed for portrait display, so when > orientation is changed to landscape the widget looks a bit distorted. > If 9patch on device is possible that seems like t

[android-developers] Re: Creating 9-patch Images on Device

2011-04-03 Thread Matt M
skink, Thank you for your input. I have not considered Drawable, but probably because I do not know much about them :) What do they bring to the table to appropriately "stretch" an image like a 9patch? Thank you! Matt. On Apr 4, 1:23 am, skink wrote: > On Apr 4, 4:44 am, Matt M wrote: > > > I

[android-developers] Re: Creating 9-patch Images on Device

2011-04-03 Thread skink
On 4 Kwi, 07:48, Matt M wrote: > skink, > > Thank you for your input. I have not considered Drawable, but probably > because I do not know much about them :) What do they bring to the > table to appropriately "stretch" an image like a 9patch? > > Thank you! > > Matt. > Matt, i'm sorry i forgot