how to reduce size of image

Put your problem here if it does not fit any of the other categories.

how to reduce size of image

Postby abhilash » Thu Mar 13, 2008 7:55 am

hi........
i am getting image from database as a byte array and drawing it on console but i am unable to resize the image ..
how to reduce the size of image........
only a part of image is seen on screen..........
[syntax="java"]
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  byte image[] = postMethod.getResponseBody();
  2.  
  3.               Bitmap bitmap1 = BitmapFactory.decodeByteArray(image, 0, image.length);
  4.  
  5.               BitmapDrawable drawable1 = new BitmapDrawable(bitmap1);
  6.  
  7.            
  8.  
  9.               ImageView imageView = new ImageView(this);
  10.  
  11.               imageView.setImageDrawable(drawable1);
  12.  
  13.               imageView.setScaleType(ScaleType.MATRIX);
  14.  
  15.             addContentView(imageView,
  16.  
  17.                                new LinearLayout.LayoutParams(
  18.  
  19.                                            LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
  20.  
  21.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4

i am doin lik this how to reduce size pls help........
abhilash
Developer
Developer
 
Posts: 26
Joined: Fri Feb 22, 2008 11:21 am
Location: HYDERABAD

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 11 guests