public static BitmapDrawable convertBytesintoDrawable(byte[]
imageBytes,
Context context,byte[] logoImageBytes) throws
IOException {
ByteArrayInputStream mainImageinputStream = new
ByteArrayInputStream(imageBytes);
ByteArrayInputStream logoImageInputStream = new
ByteArrayInputStream(logoImageBytes);
Bitmap mainImageBitmap =
BitmapFactory.decodeStream(mainImageinputStream);
//Bitmap.create
Bitmap logoBitmap =
BitmapFactory.decodeStream(logoImageInputStream);
//logoBitmap.setPixels(new int[0], 0, 0, 5, 5, 5, 5);
//logoBitmap.setPixel(5, 5, R.color.theme_black_text);
mainImageinputStream.close();
logoImageInputStream.close();
Matrix m = new Matrix();
int newWidth = 200;
int newHeight = 200;
float scaleWidth = -1;
float scaleHeight = -1;
//m.postScale(scaleWidth, scaleHeight);
//m.setScale(5, 32);
Canvas c = new Canvas();
c.drawBitmap(logoBitmap, 5, 32, paint2);
//mainImageBitmap = Bitmap.createBitmap(logoBitmap, 0, 0,
logoBitmap.getWidth(),logoBitmap.getHeight());
BitmapDrawable bmd = new BitmapDrawable(mainImageBitmap);
return bmd;
}
I want to Draw a image on image on x and y axis
i have two bitmap one is main and one is logo
i want to draw logo image on main image on 5=x and y = 32 how can i do
this ?
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---