List of usage examples for android.hardware.camera2.params TonemapCurve getPointCount
public int getPointCount(int colorChannel)
From source file:com.android.camera2.its.ItsSerializer.java
@SuppressWarnings("unchecked") private static Object serializeTonemapCurve(TonemapCurve curve) throws org.json.JSONException { JSONObject curveObj = new JSONObject(); String names[] = { "red", "green", "blue" }; for (int ch = 0; ch < 3; ch++) { JSONArray curveArr = new JSONArray(); int len = curve.getPointCount(ch); for (int i = 0; i < len; i++) { curveArr.put(curve.getPoint(ch, i).x); curveArr.put(curve.getPoint(ch, i).y); }//from w ww. j a v a 2s. c o m curveObj.put(names[ch], curveArr); } return curveObj; }