我编写的代码使位图的宽度更大但是当我应用它时,宽度变大但整个图像的大小变小了,请帮助我这是我的代码:
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);