0
我写了acode,使abitmap的宽度更大,但是当我应用它时,宽度变大但整个图像的尺寸变小,请帮助我这是我的代码:放大位图的宽度
public void max (View v){
bmpnew = Bitmap.createBitmap(bmp1.getWidth()*3, bmp1.getHeight()*3, Bitmap.Config.ARGB_8888);
bmpnew = bmpnew.copy(Bitmap.Config.ARGB_8888 ,true);
int a=0; /////x for bmp1
int b=0; /////y for bmp1
int h=0; /////x for bmpnew
int k=0; /////y for bmpnew
while (b<= hight-1){
while(a<=width-1){
int colorr= bmp1.getPixel(a, b);
bmpnew.setPixel(h, k, colorr);
bmpnew.setPixel(h+1, k, colorr);
h+=2;
a++;
}
b++;
k++;
a=0;
h=0;
}
iv.setImageBitmap(bmpnew);
@Henry对不起,我已编辑它:)请帮我 – adnan 2014-10-20 17:43:12