Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎样修改照片为4:3 #34

Open
Freshman111 opened this issue Apr 11, 2016 · 2 comments
Open

怎样修改照片为4:3 #34

Freshman111 opened this issue Apr 11, 2016 · 2 comments

Comments

@Freshman111
Copy link

大牛您好,这里面的照片是正方形的,怎样修改成长方形4:3的呢。
我想自己修改发现里面Rect和Matrix不太懂
Matrix m = new Matrix();
m.setRotate(90, PHOTO_SIZE / 2, PHOTO_SIZE / 2);
if (mCurrentCameraId == 1) {
m.postScale(1, -1);
}
Bitmap rotatedImage = Bitmap.createBitmap(croppedImage, 0, 0, PHOTO_SIZE, PHOTO_SIZE, m, true);
想了解这些东西应该看那些资料。能不能推荐几个链接

@Skykai521
Copy link
Owner

要改图片比例改的地方就比较多了,从拍照到裁剪都要改,StickerCamera对多图片比例的支持并不好。我目前也没什么时间优化。。。

@jolly336
Copy link

一般要保证预览,生成图片不变形,需要previewSize,pictureSize和surfaceView三者的尺寸比例相同即可。尺寸比例一般有4:3(1.33)和16:9(1.77)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants