Re:Supporting Low Cost Android Phones
by aw3c2 on Sunday November 04, 2012 @07:49AM
(#4739634)
Public Service Announcement about Image-/Graphicsmagick ;)
Imagemagick/Graphicsmagick have a batch image manipulation tool called mogrify. For example "mogrify -format jpeg -geometry 512 -quality 75 -path other/dir/ *.png". There usually is no need for any awkward loops that use convert once per image.
Posting this here since the linked site requires Javascript for comments.
Re:Supporting Low Cost Android Phones
by lnanek2 on Wednesday November 14, 2012 @08:35PM
(#4786638)
Thanks for the tip. I read the docs for mogrify just now, but it says it overwrites images and I don't see any option to change that or add a different output path. The need here is to take a source image from a folder like drawable-hdpi, and produce a new, converted image in a folder like drawable-ldpi. I guess maybe you could copy everything first, then modify it? Although that seems more clumsy than just running the find command already being used. Thanks for the help!
Re:Supporting Low Cost Android Phones
by mhaymo on Sunday November 04, 2012 @08:26AM
(#4739709)
I wonder how easy it would be to get Android doing this automatically. It would certainly improve performance if images could be scaled once on installation of the APK instead of every time they are displayed.
Re:Supporting Low Cost Android Phones
by lnanek2 on Wednesday November 14, 2012 @08:37PM
(#4786648)
Another advantage is that technically the Android Market will let you upload multiple APKs for a single market entry now as long as they are only compatible with different devices. So it is possible to post a different APK for each density class using compatible-screens targeting...
Re:Supporting Low Cost Android Phones
by fharper1961 on Sunday November 04, 2012 @09:41AM
(#4739864)
I wonder what the dimensions of the bitmap that caused the OutOfMemoryError were? Usually ActionBar icons are small, so it seems weird that such a small image would cause an OOME.
Re:Supporting Low Cost Android Phones
by brianbreslin on Sunday November 04, 2012 @08:23AM
(#4739702)
This brings up an interesting need: ability to easily and affordable test/simulate across the thousands of android or mobile devices. An emulator with CPU/gpu specs for each model..
Re:Supporting Low Cost Android Phones
by rogerbinns on Sunday November 04, 2012 @02:13PM
(#4740647)
You don't really need that many devices, and the cheap devices are cheap. For this kind of issue you can just use older devices since they automatically have lower specs. For example I use a G1 from 2008.
Imagemagick/Graphicsmagick have a batch image manipulation tool called mogrify. For example "mogrify -format jpeg -geometry 512 -quality 75 -path other/dir/ *.png". There usually is no need for any awkward loops that use convert once per image.
Posting this here since the linked site requires Javascript for comments.
a) defeat the point of signing
b) require a new version of Android (which these low-end phones aren't likely to get)
It'd be far easier and more effective to tweak the build tools to crunch the images before packing up the APK in the first place.