Skip to content

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

Open
Open

Description

@Freshman111

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

Activity

  1. Skykai521 commented on Apr 11, 2016

    @Skykai521
    Owner

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

  2. jolly336 commented on Apr 22, 2016

    @jolly336

    一般要保证预览,生成图片不变形,需要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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions