StickerCamera icon indicating copy to clipboard operation
StickerCamera copied to clipboard

怎样修改照片为4:3

Open Freshman111 opened this issue 9 years ago • 2 comments

大牛您好,这里面的照片是正方形的,怎样修改成长方形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); 想了解这些东西应该看那些资料。能不能推荐几个链接

Freshman111 avatar Apr 11 '16 07:04 Freshman111

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

Skykai521 avatar Apr 11 '16 07:04 Skykai521

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

jolly336 avatar Apr 22 '16 09:04 jolly336