Tag Archives: Bitmap

Bitmap的像素操作setpixel

 

Bitmap的像素操作, 用颜色填充Bitmap ,最后的效果图

Unnamed QQ Screenshot

1.main.xml

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"   [......]

Read More

, Leave a comment

将int[] Colors转换成bitmap

保留使用:

int[] colors = new int[pixeli.length];                         int value = 0;               [......]

Read More

, , Leave a comment

Android取本地或者网络图片转换成Bitmap

目的是取本来或者网络图片,将之转换成Bitmap, 再显示到相应的容器中..

1.设置缓冲区大小

private static final int IO_BUFFER_SIZE = 4 * 1024;

2.自写的函数public static Bitmap GetNetBitmap(String url):

public static Bitmap GetNetBitmap(String url) {        Bitmap bitmap = null;     &n[......]

Read More

, , Leave a comment

Android倒影bitmap图片

// 获得带倒影的图片   

public static Bitmap createReflectionImageWithOrigin(Bitmap bitmap) {         final int reflectionGap = 4;         int width = bitmap.getWidth();      [......]

Read More

, , , Leave a comment

Android圆角Bitmap图片

静态方法,几个参数, 圆角的像素

// 获得圆角图片的方法 public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, float roundPx) {

    Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),             bitmap.getHeight(), Config.ARGB_8888)[......]

Read More

, Leave a comment