Android GrayScale then Invert colors for a bitmap issue
<p>I am drawing some bitmaps to an ImageView's Canvas. The resource bitmaps are colored. The result what I would like to see is a grayscaled bitmap image that is inverted.</p>

<p>Here is my approach that is perfectly working on my Samsung Galaxy S3 (Version 4.3) but its not working on my S3 Mini (Version 4.1.2).</p>

<p>Inside of the Overrided OnDraw(Canvas canvas) method:</p>

<pre><code>    // Night mode color:
    Paint colorBMPPaint = new Paint();
    if (((EzPdfActivityPageView) mContext).bIsNightMode) {
        float invertMX[] = {
                0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
                0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
                0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
                0.0f, 0.0f, 1.0f, 0.0f, 0.0f
        };

        ColorMatrix invertCM = new ColorMatrix(invertMX);

        ColorMatrixColorFilter filter = new ColorMatrixColorFilter(invertCM);
        colorBMPPaint.setColorFilter(filter);
    }

    canvas.drawBitmap(bitmap,
                            new Rect(0, 0, (int)((bbox.right - bbox.left) * zoom), (int)((bbox.top - bbox.bottom) * zoom)),
                            pageDrawRect,
                            colorBMPPaint);
</code></pre>

<p>On S3 Mini I get only black bitmaps, why?</p>