當前位置: 首頁>>代碼示例>>Java>>正文


Java PlanarYUVLuminanceSource.renderThumbnail方法代碼示例

本文整理匯總了Java中com.google.zxing.PlanarYUVLuminanceSource.renderThumbnail方法的典型用法代碼示例。如果您正苦於以下問題:Java PlanarYUVLuminanceSource.renderThumbnail方法的具體用法?Java PlanarYUVLuminanceSource.renderThumbnail怎麽用?Java PlanarYUVLuminanceSource.renderThumbnail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.zxing.PlanarYUVLuminanceSource的用法示例。


在下文中一共展示了PlanarYUVLuminanceSource.renderThumbnail方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
	int[] pixels = source.renderThumbnail();
	int width = source.getThumbnailWidth();
	int height = source.getThumbnailHeight();
	Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
	ByteArrayOutputStream out = new ByteArrayOutputStream();
	bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
	bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
}
 
開發者ID:TonnyL,項目名稱:Espresso,代碼行數:10,代碼來源:DecodeHandler.java

示例2: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
  int[] pixels = source.renderThumbnail();
  int width = source.getThumbnailWidth();
  int height = source.getThumbnailHeight();
  Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
  ByteArrayOutputStream out = new ByteArrayOutputStream();    
  bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
  bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
  bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width / source.getWidth());
}
 
開發者ID:PhilippC,項目名稱:keepass2android,代碼行數:11,代碼來源:DecodeHandler.java

示例3: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
  int[] pixels = source.renderThumbnail();
  int width = source.getThumbnailWidth();
  int height = source.getThumbnailHeight();
  Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
  bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
  bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width / source.getWidth());
}
 
開發者ID:kkyflying,項目名稱:CodeScaner,代碼行數:11,代碼來源:DecodeHandler.java

示例4: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
    bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
    bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width / source.getWidth());
}
 
開發者ID:CoderChoy,項目名稱:BarcodeReaderView,代碼行數:11,代碼來源:DecodeHandler.java

示例5: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source,
                                    Bundle bundle) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height,
            Bitmap.Config.ARGB_8888);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
    bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
    bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width
            / source.getWidth());
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:14,代碼來源:DecodeHandler.java

示例6: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
    bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
}
 
開發者ID:WindFromFarEast,項目名稱:SmartButler,代碼行數:10,代碼來源:DecodeHandler.java

示例7: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
	int[] pixels = source.renderThumbnail();
	int width = source.getThumbnailWidth();
	int height = source.getThumbnailHeight();
	Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
	ByteArrayOutputStream out = new ByteArrayOutputStream();
	bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
	bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
}
 
開發者ID:AnyRTC,項目名稱:anyRTC-RTCP-Android,代碼行數:10,代碼來源:DecodeHandler.java

示例8: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
/**
 * create thumbnail
 *
 * @param source
 * @param bundle
 */

private void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.RGB_565);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
    bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
}
 
開發者ID:snice,項目名稱:androidscan,代碼行數:17,代碼來源:DecodeHandler.java

示例9: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
    bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
}
 
開發者ID:StickyTolt,項目名稱:ForeverLibrary,代碼行數:10,代碼來源:DecodeHandler.java

示例10: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source,
		Bundle bundle) {
	int[] pixels = source.renderThumbnail();
	int width = source.getThumbnailWidth();
	int height = source.getThumbnailHeight();
	Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height,
			Bitmap.Config.ARGB_8888);
	ByteArrayOutputStream out = new ByteArrayOutputStream();
	bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
	bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
	bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width
			/ source.getWidth());
}
 
開發者ID:dufangyu1990,項目名稱:LeCatApp,代碼行數:14,代碼來源:DecodeHandler.java

示例11: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
	int[] pixels = source.renderThumbnail();
	int width = source.getThumbnailWidth();
	int height = source.getThumbnailHeight();
	Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
	ByteArrayOutputStream out = new ByteArrayOutputStream();
	bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
	bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
	bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width / source.getWidth());
}
 
開發者ID:xiong-it,項目名稱:PortraitZXing,代碼行數:11,代碼來源:DecodeHandler.java

示例12: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height,
            Bitmap.Config.ARGB_8888);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
    bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
    bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width / source.getWidth());
}
 
開發者ID:liftting,項目名稱:android-mine-core,代碼行數:12,代碼來源:DecodeHandler.java

示例13: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static byte[] bundleThumbnail(PlanarYUVLuminanceSource source) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 50, out);
    return  out.toByteArray();
}
 
開發者ID:hnlbxb2004,項目名稱:ZxingSupport,代碼行數:10,代碼來源:QRCodeCameraDecode.java

示例14: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
    int[] pixels = source.renderThumbnail();
    int width = source.getThumbnailWidth();
    int height = source.getThumbnailHeight();
    Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
    bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
    bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width / source.getWidth());
}
 
開發者ID:raahilshah,項目名稱:ProjectKilo,代碼行數:11,代碼來源:DecodeHandler.java

示例15: bundleThumbnail

import com.google.zxing.PlanarYUVLuminanceSource; //導入方法依賴的package包/類
private static void bundleThumbnail(PlanarYUVLuminanceSource source, Bundle bundle) {
  int[] pixels = source.renderThumbnail();
  int width = source.getThumbnailWidth();
  int height = source.getThumbnailHeight();
  Bitmap bitmap = Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888);
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
  bundle.putByteArray(DecodeThread.BARCODE_BITMAP, out.toByteArray());
  bundle.putFloat(DecodeThread.BARCODE_SCALED_FACTOR, (float) width / source.getWidth());
}
 
開發者ID:corneliudascalu,項目名稱:google-glass-share-barcode-bluetooth,代碼行數:11,代碼來源:DecodeHandler.java


注:本文中的com.google.zxing.PlanarYUVLuminanceSource.renderThumbnail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。