use of com.yydcdut.note.utils.camera.param.Size in project PhotoNoter by yydcdut.
the class Camera2SettingModel method getSupportPictureSizes.
@Override
public List<Size> getSupportPictureSizes() {
StreamConfigurationMap map = mCameraCharacteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
if (map == null) {
return null;
}
android.util.Size[] supports = map.getOutputSizes(ImageFormat.JPEG);
List<Size> sizeList = new ArrayList<>(supports.length);
for (android.util.Size size : supports) {
sizeList.add(Size.translate(size.getWidth(), size.getHeight()));
}
return sizeList;
}
use of com.yydcdut.note.utils.camera.param.Size in project PhotoNoter by yydcdut.
the class Camera2SettingModel method getSupportPreviewSizes.
@Override
public List<Size> getSupportPreviewSizes() {
StreamConfigurationMap map = mCameraCharacteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
if (map == null) {
return null;
}
android.util.Size[] supports = map.getOutputSizes(SurfaceTexture.class);
List<Size> sizeList = new ArrayList<>(supports.length);
for (android.util.Size size : supports) {
sizeList.add(Size.translate(size.getWidth(), size.getHeight()));
}
return sizeList;
}
Aggregations