问题描述
我正在使用FotoApparat库,该库具有帧处理器功能。在前进显示之前如何裁剪和缩放框架?
val cameraview = findViewById<Cameraview>(R.id.cameraview)
val cameraConfiguration = CameraConfiguration(
pictureResolution = firstAvailable(
{Resolution(1280,720)},highestResolution()
),previewResolution = firstAvailable(
wideRatio({ Resolution(1280,720) }),wideRatio(lowestResolution())
),previewFpsRange = highestFps(),focusMode = firstAvailable(
continuousFocusPicture(),autoFocus(),fixed()
),jpegQuality = manualJpegQuality(90),frameProcessor = { (frame)->{
Log.v("We got the Frame here",frame.toString())
// HOW to CROP the image (x,y,width,height) and Scale it?
}() }
)
fotoapparat = Fotoapparat(
context = this,view = cameraview,scaleType = ScaleType.CenterCrop,lensPosition = back(),logger = loggers(
logcat()
),cameraConfiguration = cameraConfiguration,cameraErrorCallback = { error ->
println("Recorder errors: $error")
}
)
任何有帮助的信息都是很好的支持。作物或规模或两者。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)