One trick that seems to work is to convert the bitmap to an int array containing raw pixel values, and then draw it using the version of drawBitmap that takes an int[] instead of a Bitmap. The pixel data appears to be saved in the serialized Picture using 'SkMallocPixelRef' with raw pixel values; obviously this isn't as efficient to store and load as a PNG, but for smaller images that's probably ok.
On Oct 5, 3:13 pm, Mark <[email protected]> wrote: > I'm working on some code that uses the android.graphics.Picture object > to record a series of drawing calls including a some drawBitmap > operations that draw images. Everything works great, but if I save > the Picture object using writeToStream and then recreate it later on > using Picture.createFromStream, none of the bitmaps are showing up. > > Is this a bug or a limitation of the serialization process? If it's > the later, is there a way to manually provide a deserialized Picture > object with the bitmaps that it should use? > > Thanks. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

