android


Retrieve memory of Bitmap/Drawable


I need the raw bitmap memory of an Android drawable (the app icon). By raw bitmap I mean the memory representation of the image. (I need it for reading in a c++ Qt app, to convert that image to Qt formats).
So far I can't find a way to get the memory either of a Drawable Bitmap or Canvas. One way would be geting each pixel's colors but I foresee this uneficient/slow.
Is that possible? Any hint?
Are you looking for the raw bytes? If so you can read it into a byte array. This is pseudo code but something like this.
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(stream);
byte[] byte = stream.toByteArray();
try
bitmap.writeToParcel(parcel p, int flags);
parcel.readByteArray(byte[] array);
hope that gets you there. ha

Related Links

android support libraries causing errors with legal and valid methods
Why won't the BroadcastReceiver work?
EditText new “row” after 25 characters
SQLite doesn't insert values
How to delete the Existing Records in table and insert new Value in sqlite?
After completely close the app, unable to receive notification from gcm
override empty method in custom view and handle it in MainActivity
ClassNotFoundException: Of Module inside a library project's AAR file
Android: java.lang.NullPointerException at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:490)
How to set time range using seekbar
Rendering Problems on android studio: the following class could not be instantiated
Programmatically setting icon to navigation drawer menu item using drawable resource is always black in Android
DSP (Digital Sound Processing) with Android Media Player
AOSP layout xml file preview in eclipse
Sending a parameter from activity1 to Activity2
Android - Keep Service Running to keep Data in Storage

Categories

HOME
android
django
telegram
formal-languages
jwplayer
can
database-normalization
gembox-spreadsheet
limit
webix
modal-dialog
project
heap
ycsb
jxl
gkturnbasedmatch
zerobrane
symmetricds
flash-player
bitnami
do-while
google-content-api
imessage
pyramid
mapstruct
replication
simpleitk
breadth-first-search
spring-async
mount
appirater
underscore.js
soot
google-earth
panoramas
volatile
weather
cognos-bi
dumpbin
playstation-portable
reactjs.net
html-encode
tex
p4merge
mcustomscrollbar
resolution
linqpad
claims
file-sharing
clang++
facebook-social-plugins
monkey-testing
dynamic-linq
jquery-ui-draggable
convex-optimization
google-cse
modelsim
boxing
yii2-user
ngmaterial
gameplay-kit
rxtx
pocketsphinx-android
angular2-testing
autosar
swizzling
shopping
http-status-code-401
riot
bizagi
sciruby
lazybones
xvim
coda
iced-coffeescript
botan
alloy-ui
public-html
uncaught-typeerror
ssis-data-flow
administration
sonarqube-5.0
linkedin-jsapi
create.js
ray
terminate
high-resolution
notorm
gtm-oauth2
solace-mq
scmmanager
dopostback
uimanageddocument
pyunit
appjs
usertype
convention
node-redis
lr
multiplatform
msr
twitterizer
svk
facebook-iframe
globals
office-2007
sifr
fault-tolerance
pbcopy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App