当前位置: 首页>>代码示例>>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;未经允许,请勿转载。