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

I am not able to debug this AsyncTasc
How to play mp3 file from internal storage?
Android: Unable to start activity
Android - In a button On click event, button goes missing
Android Speech-To-Text : option to remain it active after speech stops
Android - I don't understand this instruction (like command prompt)
EMM Agents not updating Infpormation
Some image parts get hidden under frame in viewpager/imageview?
Android Webview on 4.4 freezes with nativeOnDraw failed; clearing to background color
How to Determine Build Process for Inherited Android App
camera captured image share to different application
Xamarin.Forms ListView: Set the highlight color of a tapped item
How to open the main app from the wearable?
Drive Api auth suddenly fails
The regular expression says no match found it is just a simple expression
Leak of memory with a rescale of bitmap

Categories

HOME
prism
webdriver
hessian
pdfbox
yandex
cq5
pyqt4
babeljs
jtextpane
recordrtc
computer-science
p2p
plist
why3
angular-dart
eip
bitnami
linear-algebra
azure-iot-hub
red5
xmonad
apache2.4
named-entity-recognition
ckfinder
opentk
interbase
jquery-multiselect
8051
ceylon
userdefaults
autodesk-designautomation
send
event-flow
livelink
powershell-ise
mockjax
record
turfjs
angularjs-material
glib
hibernate-validator
contacts
classcastexception
python-import
getlasterror
openalpr
flatmap
linq-to-objects
watchface
placeholder
strftime
dapper-simplecrud
jide
proget
openrasta
insight
bbpress
smartfoxserver
simplepie
winusb
envi
greatest-n-per-group
jquery-jscrollpane
installshield-2010
vorpal.js
halcon
invoke-sqlcmd
assertion
sciruby
forwarding
visual-sourcesafe-2005
liquid-layout
typeconverter
aspectj-maven-plugin
zxspectrum
broadband
exceldatareader
post-commit-hook
mdichild
xml-namespaces
verold
malformedurlexception
renderer
twitter-bootstrap-rails
synapse
jeromq
cmmi
process-explorer
facebook-timeline
chart-director
http-status-code-410
nokia-s40
monotouch.dialog
veracity
multiplexing
pinch
saxparseexception
entitydatasource
massive
presentation-layer
ruby-1.8
undefined-index
jqueryform
application-verifier
scrollbars
glui
product-management
httpcookie
change-management

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