记录三种实现图片模糊的方法

前言

最近给自己挖了几个坑,准备填一下。现在来填一下第一个坑:图片模糊。关于图片模糊的方法有很多,比如:Open CV 的各种图片处理、Android 支持的高性能密集型任务执行框架 RenderScript、Java 或者 C/C++ 的算法实现图片模糊处理。本篇文章将包含以下内容:

  • RenderScript 简介与图片模糊的实现
  • Java / C++ 算法实现图片模糊处理
  • 一个简单的动态模糊实现
  • 总结

至于 Open CV 我以前的一些文有些简单的介绍,如果只是想模糊图片就引入整个的 Open CV 个人感觉还是有点“杀鸡用牛刀”的感觉。对了,关于算法实现什么的……我只是个代码收集者,并非我自己实现的。

开始之前先放个图,做成什么样心里有点x数

动态模糊.gif

如果你看过我同学的那篇Android:简单靠谱的动态高斯模糊效果
你一定会发现我这个布局跟他的有那么一些相似,哇哈哈哈哈哈,你猜对了,我去他项目里复制的。当然了,实现方式不一样,他是用的 RecyclerView 实现的,我这里就自己复写了 Activity 的 onTouch 实现的动态模糊。

RenderScript

首先简单的介绍一下 RenderScript 这里是我读文档的翻译……又到了展现真正的辣鸡英语水平的时候了……

RenderScript 是 Android 上的高性能计算密集型任务的框架。虽然串行工作也能受益,但是RenderScript 主要面向并行数据计算。RenderScript 运行时可以跨越设备上可用的处理器如多核CPU和GPU进行并行工作。这让你可以专注于算法,而不是调度工作。RenderScript 对于应用进行图像处理,计算摄影或者计算机视觉等方面特别有用。
要开始使用RenderScript,有两个主要概念应该要理解:

  • 语言本身是为了编写高性能计算代码产生的 C99 衍生语言。这篇文章描述了如何使用它去编写一个计算内核。

  • 控制 API 是用来管理 RenderScript 资源的生命周期和控制内核运行的。这套API有三套语言实现:Java,Android NDK 的 C++ 和 C99 派生的内核语言本身。

恩,BB这么多,我们只需要有个大致概念就行了,因为也不是专门去学习这套框架,我们只是需要使用这套框架的一丁点图片处理相关的东西而已。千言万语,最后就一句话:

RenderScript 是 Android 上的高性能计算密集型任务的框架

行,对 RenderScript 有了大致的了解后,可以开始了,官方文档里其实有比较详细的流程,先创建什么 context 啦,然后分配内存巴拉巴拉的拉,不过我这又不是在学RenderScript,而是想实现一个功能,用完就可以把这框架扔一边了,如果你也是这样,不妨直接 copy 下面的代码:

    /**
     * 图片缩放比例
     */
    private static final float BITMAP_SCALE = 0.4f;
    /**
     * 最大模糊度(在0.0到25.0之间)
     */
    private static final float BLUR_RADIUS = 25f;

    public static Bitmap blur(Context context, Bitmap image) {
        // 计算图片缩小后的长宽
        int width = Math.round(image.getWidth() * BITMAP_SCALE);
        int height = Math.round(image.getHeight() * BITMAP_SCALE);

        // 将缩小后的图片作为预渲染的图片
        Bitmap inputBitmap = Bitmap.createScaledBitmap(image, width, height, false);
        // 创建一张渲染后的输出图片
        Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap);

        // 初始化 RenderScript 上下文
        RenderScript rs = RenderScript.create(context);
        // 创建一个模糊效果的 RenderScript 的工具对象
        ScriptIntrinsicBlur blur = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));

        // 由于RenderScript并没有使用VM来分配内存,所以需要使用Allocation类来创建和分配内存空间。
        // 创建Allocation对象的时候其实内存是空的,需要使用copyTo()将数据填充进去。
        Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap);
        Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap);
        // 设置渲染的模糊程度, 25f是最大模糊度
        blur.setRadius(BLUR_RADIUS);
        // 设置blurScript对象的输入内存
        blur.setInput(tmpIn);
        // 将输出数据保存到输出内存中
        blur.forEach(tmpOut);
        // 将数据填充到Allocation中
        tmpOut.copyTo(outputBitmap);
        return outputBitmap;
    }

运行效果:

renderscript.png

Java & C++

这两种都是采用同一种算法实现的,本质上都是对像素数组进行处理运算。本来我以为C++的方式会快一些,没想到在我的mix2上运行反而是Java实现的算法会快一些。唉,真是辣鸡C++还不如Java。 当然了……讲道理,代码我看了,就是一样的,可能是jni的开销吧。这里为什么要介绍Javah和C++的算法实现呢,因为RenderScript虽然文档上说可以运行在2.3及以上的平台,但是这个图片处理的api最低版本是17。所以说,如果你有需要兼容低版本,还是得采用下别的实现。

这里只放一下Java的实现代码,因为反而比较快的关系……至于JNI,我这里偷了个懒,因为以前用CMake项目编译生成了so,所以这里直接引用了so。当然了cpp源码也放在了项目里,感兴趣的可以自己去编译一下:

    /**
     * StackBlur By Java Bitmap
     *
     * @param bmp    bmp Image
     * @param radius Blur radius
     * @return Image Bitmap
     */
    public static Bitmap blurInJava(Bitmap bmp, int radius) {
        // Stack Blur v1.0 from
        // http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html
        //
        // Java Author: Mario Klingemann <mario at quasimondo.com>
        // http://incubator.quasimondo.com
        // created Feburary 29, 2004
        // Android port : Yahel Bouaziz <yahel at kayenko.com>
        // http://www.kayenko.com
        // ported april 5th, 2012

        // This is a compromise between Gaussian Blur and Box blur
        // It creates much better looking blurs than Box Blur, but is
        // 7x faster than my Gaussian Blur implementation.
        //
        // I called it Stack Blur because this describes best how this
        // filter works internally: it creates a kind of moving stack
        // of colors whilst scanning through the image. Thereby it
        // just has to add one new block of color to the right side
        // of the stack and remove the leftmost color. The remaining
        // colors on the topmost layer of the stack are either added on
        // or reduced by one, depending on if they are on the right or
        // on the left side of the stack.
        //
        // If you are using this algorithm in your code please add
        // the following line:
        //
        // Stack Blur Algorithm by Mario Klingemann <mario@quasimondo.com>
        if (radius < 1) {
            return (null);
        }

        Bitmap bitmap = ratio(bmp, bmp.getWidth() * BITMAP_SCALE, bmp.getHeight() * BITMAP_SCALE);
//        Bitmap bitmap = bmp.copy(Bitmap.Config.ARGB_8888, true);
        // Return this none blur
        if (radius == 1) {
            return bitmap;
        }
        bmp.recycle();

        int w = bitmap.getWidth();
        int h = bitmap.getHeight();

        int[] pix = new int[w * h];
        // get array
        bitmap.getPixels(pix, 0, w, 0, 0, w, h);

        // run Blur
        int wm = w - 1;
        int hm = h - 1;
        int wh = w * h;
        int div = radius + radius + 1;

        short r[] = new short[wh];
        short g[] = new short[wh];
        short b[] = new short[wh];
        int rSum, gSum, bSum, x, y, i, p, yp, yi, yw;
        int vMin[] = new int[Math.max(w, h)];

        int divSum = (div + 1) >> 1;
        divSum *= divSum;

        short dv[] = new short[256 * divSum];
        for (i = 0; i < 256 * divSum; i++) {
            dv[i] = (short) (i / divSum);
        }

        yw = yi = 0;

        int[][] stack = new int[div][3];
        int stackPointer;
        int stackStart;
        int[] sir;
        int rbs;
        int r1 = radius + 1;
        int routSum, goutSum, boutSum;
        int rinSum, ginSum, binSum;

        for (y = 0; y < h; y++) {
            rinSum = ginSum = binSum = routSum = goutSum = boutSum = rSum = gSum = bSum = 0;
            for (i = -radius; i <= radius; i++) {
                p = pix[yi + Math.min(wm, Math.max(i, 0))];
                sir = stack[i + radius];
                sir[0] = (p & 0xff0000) >> 16;
                sir[1] = (p & 0x00ff00) >> 8;
                sir[2] = (p & 0x0000ff);

                rbs = r1 - Math.abs(i);
                rSum += sir[0] * rbs;
                gSum += sir[1] * rbs;
                bSum += sir[2] * rbs;
                if (i > 0) {
                    rinSum += sir[0];
                    ginSum += sir[1];
                    binSum += sir[2];
                } else {
                    routSum += sir[0];
                    goutSum += sir[1];
                    boutSum += sir[2];
                }
            }
            stackPointer = radius;

            for (x = 0; x < w; x++) {

                r[yi] = dv[rSum];
                g[yi] = dv[gSum];
                b[yi] = dv[bSum];

                rSum -= routSum;
                gSum -= goutSum;
                bSum -= boutSum;

                stackStart = stackPointer - radius + div;
                sir = stack[stackStart % div];

                routSum -= sir[0];
                goutSum -= sir[1];
                boutSum -= sir[2];

                if (y == 0) {
                    vMin[x] = Math.min(x + radius + 1, wm);
                }
                p = pix[yw + vMin[x]];

                sir[0] = (p & 0xff0000) >> 16;
                sir[1] = (p & 0x00ff00) >> 8;
                sir[2] = (p & 0x0000ff);

                rinSum += sir[0];
                ginSum += sir[1];
                binSum += sir[2];

                rSum += rinSum;
                gSum += ginSum;
                bSum += binSum;

                stackPointer = (stackPointer + 1) % div;
                sir = stack[(stackPointer) % div];

                routSum += sir[0];
                goutSum += sir[1];
                boutSum += sir[2];

                rinSum -= sir[0];
                ginSum -= sir[1];
                binSum -= sir[2];

                yi++;
            }
            yw += w;
        }
        for (x = 0; x < w; x++) {
            rinSum = ginSum = binSum = routSum = goutSum = boutSum = rSum = gSum = bSum = 0;
            yp = -radius * w;
            for (i = -radius; i <= radius; i++) {
                yi = Math.max(0, yp) + x;

                sir = stack[i + radius];

                sir[0] = r[yi];
                sir[1] = g[yi];
                sir[2] = b[yi];

                rbs = r1 - Math.abs(i);

                rSum += r[yi] * rbs;
                gSum += g[yi] * rbs;
                bSum += b[yi] * rbs;

                if (i > 0) {
                    rinSum += sir[0];
                    ginSum += sir[1];
                    binSum += sir[2];
                } else {
                    routSum += sir[0];
                    goutSum += sir[1];
                    boutSum += sir[2];
                }

                if (i < hm) {
                    yp += w;
                }
            }
            yi = x;
            stackPointer = radius;
            for (y = 0; y < h; y++) {
                // Preserve alpha channel: ( 0xff000000 & pix[yi] )
                pix[yi] = (0xff000000 & pix[yi]) | (dv[rSum] << 16) | (dv[gSum] << 8) | dv[bSum];

                rSum -= routSum;
                gSum -= goutSum;
                bSum -= boutSum;

                stackStart = stackPointer - radius + div;
                sir = stack[stackStart % div];

                routSum -= sir[0];
                goutSum -= sir[1];
                boutSum -= sir[2];

                if (x == 0) {
                    vMin[y] = Math.min(y + r1, hm) * w;
                }
                p = x + vMin[y];

                sir[0] = r[p];
                sir[1] = g[p];
                sir[2] = b[p];

                rinSum += sir[0];
                ginSum += sir[1];
                binSum += sir[2];

                rSum += rinSum;
                gSum += ginSum;
                bSum += binSum;

                stackPointer = (stackPointer + 1) % div;
                sir = stack[stackPointer];

                routSum += sir[0];
                goutSum += sir[1];
                boutSum += sir[2];

                rinSum -= sir[0];
                ginSum -= sir[1];
                binSum -= sir[2];

                yi += w;
            }
        }

        // set Bitmap
        bitmap.setPixels(pix, 0, w, 0, 0, w, h);

        return (bitmap);
    }
image.png

动态模糊

这里实现的效果图就是开头的那张gif了,首先要明白一点,动态模糊,不可能每一帧都去调用方法生成一张模糊图,那样效率太低了。这里看了别人的思路,先生成一张模糊图片,之后在原来的布局上放上两个ImageView,一张原图,上面的一张是模糊图,动态改变上面模糊图的透明值就能实现动态透明效果。这想法阔以,只生成了一次模糊图片。

这里底部布局我本来是想放一个布局在屏幕外,后来发现这样无论怎么滑动都不能把布局滑入。可能是代码有问题,也可能是父容器的问题。于是之后就写了个全屏的布局,但是在界面启动后将之移动到屏幕外。设置了上下两块可点击将布局滑出的区域,在滑动的时候动态设置模糊图片控件的alpha值,这样就实现了动态模糊,话不多说,上关键代码:
布局代码:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/iv_img"
        android:src="@drawable/test"
        android:scaleType="fitXY"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <ImageView
        android:id="@+id/iv_blur_img"
        android:scaleType="fitXY"
        android:alpha="0"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <LinearLayout
        android:id="@+id/rl_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tv_tem"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:fontFamily="sans-serif-thin"
            android:gravity="bottom"
            android:text="37°"
            android:textColor="@android:color/white"
            android:textSize="90sp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="120dp"
            android:layout_marginTop="36dp"
            android:background="#44000000"
            android:orientation="vertical"
            android:paddingLeft="20dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="WeatherInfo"
                android:textColor="@android:color/white"
                android:textSize="24sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginTop="10dp"
                android:text="Show more info"
                android:textColor="@android:color/white" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="120dp"
            android:layout_marginTop="36dp"
            android:background="#44000000"
            android:orientation="vertical"
            android:paddingLeft="20dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="WeatherInfo"
                android:textColor="@android:color/white"
                android:textSize="24sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginTop="10dp"
                android:text="Show more info"
                android:textColor="@android:color/white" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="120dp"
            android:layout_marginTop="36dp"
            android:background="#44000000"
            android:orientation="vertical"
            android:paddingLeft="20dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="WeatherInfo"
                android:textColor="@android:color/white"
                android:textSize="24sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginTop="10dp"
                android:text="Show more info"
                android:textColor="@android:color/white" />
        </LinearLayout>

    </LinearLayout>

</RelativeLayout>

Activity代码:

package com.xiasuhuei321.blur;

import android.content.Context;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;

import com.xiasuhuei321.gank_kotlin.ImageProcess;

/**
 * Created by xiasuhuei321 on 2017/10/15.
 * author:luo
 * e-mail:xiasuhuei321@163.com
 */

public class DynamicBlurActivity extends AppCompatActivity {

    private ImageView blurImg;
    private int height;
    private View container;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        int flag = WindowManager.LayoutParams.FLAG_FULLSCREEN;
        //获得当前窗体对象
        Window window = this.getWindow();
        //设置当前窗体为全屏显示
        window.setFlags(flag, flag);
        setContentView(R.layout.activity_dynamic_blur);
        initView();
        WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
        height = wm.getDefaultDisplay().getHeight();
    }

    private void initView() {
        blurImg = (ImageView) findViewById(R.id.iv_blur_img);
        blurImg.setImageBitmap(ImageProcess.blur(this,
                BitmapFactory.decodeResource(getResources(), R.drawable.test)));
        container = findViewById(R.id.rl_container);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                container.setTranslationY(height + 100);
            }
        }, 100);
    }

    float y;
    boolean scrollFlag = false;
    float sumY = 0;
    boolean isShow = false;

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        switch (event.getAction()) {
            case MotionEvent.ACTION_DOWN:
                y = event.getY();
                if (y > height * 0.9) {
                    scrollFlag = true;
                } else if (y < height * 0.1) {
                    if (!isShow) return false;
                    scrollFlag = true;
                }
                break;

            case MotionEvent.ACTION_MOVE:
                sumY = event.getY() - y;
                if (scrollFlag) {
                    container.setTranslationY(event.getY());
                    if (!isShow) blur(sumY);
                    else reverseBlur(sumY);
                }
                Log.e("DynamicBlurActivity", "滚动sumY值:" + sumY + " scrollFlag:" + scrollFlag);

                break;

            case MotionEvent.ACTION_UP:
                if(scrollFlag) {
                    if (Math.abs(sumY) > height * 0.5) {
                        if (isShow) hide();
                        else show();
                    } else {
                        if (isShow) show();
                        else hide();
                    }
                    sumY = 0;
                }
                scrollFlag = false;
                break;
        }

        return true;
    }

    private void hide() {
        container.setTranslationY(height + 100);
        blur(0);
        isShow = false;
    }

    private void show() {
        container.setTranslationY(0);
        blur(1000);
        isShow = true;
    }

    private void blur(float sumY) {
        float absSum = Math.abs(sumY);
        float alpha = absSum / 1000;
        if (alpha > 1) alpha = 1;
        blurImg.setAlpha(alpha);
    }

    private void reverseBlur(float sumY) {
        float absSum = Math.abs(sumY);
        float alpha = absSum / 1000;
        if (alpha > 1) alpha = 1;
        blurImg.setAlpha(1 - alpha);
    }
}

总结

在刚开始的时候我非常的作死,选用的图片是1080 * 1920 的,在处理的时候一看内存,我 * 飙到了200多M,而且处理这张图片花费了6.6秒左右的时间。我打印了一下这图片转化成Bitmap的width和height 分别是

长宽

这如果是 ARGB_8888 那么一张图就是61M,加上处理需要一个像素数组,得,另一个61M。剩下在处理像素的时候各种申请的内存飙到200M也不是不可以理解。本来我想是不是可以使用同一张 Bitmap,在最后setPixels的时候就不用再申请一次内存了,但是发现这样不行,直接报错了。因为从资源文件拿到的 Bitmap 的 isMutable属性是false,不可以直接在原来的 Bitmap 上 setPixels 。所以原来还需要拷贝一份Bitmap,不过拷贝之后可以将调用 bitmap.recycle() 方法,将之赶紧回收了。

当然,像我这样头铁硬怼并不好,飙到200M市面上很多手机都会OOM……更好的方式是对缩略图进行模糊处理。Android里有个缩略图工具,就几个方法,还挺好用的,我这里就用的缩略图工具获取缩略图:

    public static Bitmap ratio(Bitmap bmp, float pixelW, float pixelH) {
        return ThumbnailUtils.extractThumbnail(bmp, (int) pixelW, (int) pixelH);
    }

在进行处理前先获取缩略图,然后再去处理效率无疑会高非常多。

最后,放上项目地址:https://github.com/ForgetAll/Blur

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,847评论 4 362
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,208评论 1 292
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,587评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,942评论 0 205
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,332评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,587评论 1 218
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,853评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,568评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,273评论 1 242
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,542评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,033评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,373评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,031评论 3 236
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,073评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,830评论 0 195
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,628评论 2 274
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,537评论 2 269

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 170,568评论 25 707
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 11,613评论 4 59
  • 近年来,图片高斯模糊备受设计师的青睐,在各大知名APP中,如微信、手机QQ、网易云音乐等等都有对背景高斯图模糊的设...
    依然范特稀西阅读 45,160评论 19 203
  • 内容抽屉菜单ListViewWebViewSwitchButton按钮点赞按钮进度条TabLayout图标下拉刷新...
    皇小弟阅读 46,415评论 22 663
  • 入夜,深梦 黑暗把我揽入怀中 包裹我的温暖 是听不到的众人呼吸吧 还是呼啸又刺骨的寒风 那么多人过去 那么多事轮回...
    寒山奉月阅读 423评论 0 0