I've done some tests with the insertImage call and it looks like it
hard coded to always use a high rate of compression. In my tests I
took a 3000x2000 pixel image, which is ~6MB as a jpeg at max quality,
and passed the file path in to insertImage. The image that was saved
to the phone's DCIM folder ends up being ~600KB, which is tiny for a 6
megapixel image. (I also tried passing in the path to the same
3000x2000 image, this time saved at minimum quality, which made it
around 300KB. After passing through insertImage the resultant image
was ~400KB.)

I have a few questions:
- is it possible to vary the compression that insertImage uses when it
saves?
- why is insertImage reading in a jpeg and then writing it back out,
rather than simply copying it? in addition to the undesirable effects
of repeated lossy compression on the same image, this means that the
device's VM becomes a limiting factor. in practice this means that
insertImage fails on a 10 megapixel image on my n1
- finally, are there any guidelines or rules on writing an image
myself to the device's DCIM folder? is this an accepted practice or
frowned upon? in addition to avoiding repeated compression on my
images, this would allow me to create my own subfolder, giving my
images their own gallery

(I tried submitting this a day ago and haven't seen it show up; I'm
not sure if this is simply how long it takes, or if my message got
lost in the shuffle somewhere, so I'm resubmitting.)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to