MaxstARSDK  3.5.0
All Classes Functions Variables
SurfaceThumbnail.java
1 /*
2  * Copyright 2016 Maxst, Inc. All Rights Reserved.
3  */
4 package com.maxst.ar;
5 
9 public class SurfaceThumbnail {
10 
11  private long cMemPtr;
12 
13  SurfaceThumbnail(long cMemPtr) {
14  this.cMemPtr = cMemPtr;
15  }
16 
20  public int getWidth() {
21  return MaxstARJNI.SurfaceThumbnail_getWidth(cMemPtr);
22  }
23 
27  public int getHeight() {
28  return MaxstARJNI.SurfaceThumbnail_getHeight(cMemPtr);
29  }
30 
34  public int getBpp() {
35  return MaxstARJNI.SurfaceThumbnail_getBpp(cMemPtr);
36  }
37 
42  return ColorFormat.fromValue(MaxstARJNI.SurfaceThumbnail_getFormat(cMemPtr));
43  }
44 
48  public int getLength() {
49  return MaxstARJNI.SurfaceThumbnail_getLength(cMemPtr);
50  }
51 
55  public byte [] getData() {
56  byte [] data = new byte [getLength()];
57  MaxstARJNI.SurfaceThumbnail_getData(cMemPtr, data);
58  return data;
59  }
60 }