Code example for Bitmap

Methods: getConfig

0
	// =========================================================== 
	// Methods 
	// =========================================================== 
 
	protected Bitmap swapColor(final Bitmap pBitmap) {
		final Config config = pBitmap.getConfig();
		switch (config) {
			case ARGB_8888:
				return ColorSwapBitmapTextureAtlasSource.swapColorARGB_8888(pBitmap, this.mColorKeyColorARGBPackedInt, this.mTolerance, this.mColorSwapColorARGBPackedInt);
			default: 
				Debug.w("Unexpected " + Bitmap.Config.class.getSimpleName() + ": '" + config + "'.");
				return pBitmap;
		} 
	} 
 
	protected static final Bitmap swapColorARGB_8888(final Bitmap pBitmap, final int pColorKeyColorARGBPackedInt, final int pTolerance, final int pColorSwapColorARGBPackedInt) {
		final int[] pixelsARGB_8888 = GLHelper.getPixelsARGB_8888(pBitmap);
		pBitmap.recycle();
 
		final int keyRed = (pColorKeyColorARGBPackedInt >> Color.ARGB_PACKED_RED_SHIFT) & 0xFF;
		final int keyGreen = (pColorKeyColorARGBPackedInt >> Color.ARGB_PACKED_GREEN_SHIFT) & 0xFF;