| | |
| | | Button btnCancel; |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// imageHeight |
| | | /// OutputYSize 400代表Y分辨率高的值,所以最终得到图片的分辨率为:266*400 |
| | | /// 0代表不指定不压缩,直接保存裁剪后的图片,目前只对iOS有效 Android设置小于0的话默认800 |
| | | /// </summary> |
| | | #if __IOS__ |
| | | const int imageHeight = 0; |
| | | #else |
| | | const int imageHeight = 400; |
| | | #endif |
| | | |
| | | |
| | | |
| | |
| | | CropImage.TakePicture((imagePath) => |
| | | { |
| | | CropImageCallBack(imagePath, 1, imageName); |
| | | }, imageName, 4, 6, 400); |
| | | }, imageName, 4, 6, imageHeight); |
| | | |
| | | pictureOptionView.Parent.RemoveFromParent(); |
| | | }; |
| | |
| | | CropImage.SelectPicture((imagePath) => |
| | | { |
| | | CropImageCallBack(imagePath, 2, imageName); |
| | | }, imageName, 4, 6, 400);//OutputYSize目前仅对Android有些 400代表Y的最多分辨率,所以最终得到图片的分辨率为:266*400 |
| | | }, imageName, 4, 6, imageHeight); |
| | | |
| | | pictureOptionView.Parent.RemoveFromParent(); |
| | | }; |
| | |
| | | CropImage.TakePicture((imagePath) => |
| | | { |
| | | CropImageCallBack(imagePath, 2, imageName); |
| | | }, imageName, 4, 6, 400); |
| | | }, imageName, 4, 6, imageHeight); |
| | | } |
| | | else |
| | | { |
| | | CropImage.SelectPicture((imagePath) => |
| | | { |
| | | CropImageCallBack(imagePath, 1, imageName); |
| | | }, imageName, 4, 6, 400); |
| | | }, imageName, 4, 6, imageHeight); |
| | | } |
| | | } |
| | | }; |
| | |
| | | try |
| | | { |
| | | string base64string = Convert.ToBase64String(imageBytes); |
| | | Utlis.WriteLine("上传图片Length:" + imageBytes.Length + " base64:" + base64string); |
| | | var pack = new HttpServerRequest().FaceSetting(base64string); |
| | | if (pack != null) |
| | | { |