Giter VIP home page Giter VIP logo

xingda920813 / hellocamera2 Goto Github PK

View Code? Open in Web Editor NEW
152.0 152.0 51.0 1.16 MB

Android 自定义相机: 可定制的 UI, 压缩到指定分辨率级别, 裁剪指定区域, 大图预览. (Android custom camera: Customizable UI, compress to specific resolution level, clip specific area programmatically, picture preview, usage of Camera / Camera2 API.)

License: MIT License

Java 100.00%
camera2-api clipping compress-images custom-camera preview

hellocamera2's Issues

如何修改裁剪的代码

你好,我认真看了,修改布局里面52和896裁剪的就不全,我没看到裁剪的代码啊!能指点一下吗

您好 您的布局写的有点看不懂

请问您的布局写的效果出来跟我copy你的显示出来不一样,我的就是竖屏的效果,而你的变成横屏的效果。还有我的相机预览效果就是不正常的,被旋转放大了

Camera2 的ImageSaver每次会被执行2次,

昨天在使用你的demo的同时发现,注意到Camera2 的ImageSaver每次会被执行2次
08-02 23:44:53.178 32381-19612/com.xdandroid.hellocamera2 D/Camera2BasicFragment: /data/user/0/com.xdandroid.hellocamera2/cache/images/mFile
08-02 23:44:53.213 32381-19612/com.xdandroid.hellocamera2 D/Camera2BasicFragment: /data/user/0/com.xdandroid.hellocamera2/cache/images/mFile
08-02 23:44:53.235 32381-19612/com.xdandroid.hellocamera2 I/执行ImageSaver: file:///data/user/0/com.xdandroid.hellocamera2/cache/images/mFile
08-02 23:44:53.283 32381-19612/com.xdandroid.hellocamera2 I/执行ImageSaver: file:///data/user/0/com.xdandroid.hellocamera2/cache/images/mFile

编译不了

你这个开发环境是什么啊,我下载你这个代码,报错一个接一个的来

Error:No resource identifier found for attribute 'appComponentFactory' in package 'android'

相机权限问题

作者你好,为什么你的项目在6.0以下的手机上也会弹出Camera申请权限的弹窗,而且点禁止的话,会报空指针。错误如下:
java.lang.NullPointerException: onNext called with null. Null values are generally not allowed in 2.x operators and sources.

出错的代码位置:initCamera()内;
Flowable.create((FlowableOnSubscribe) e -> e.onNext(CameraUtils.getCamera()),BackpressureStrategy.BUFFER)**********************这里
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(camera -> {
});
我项目利用的是rxPermissions做的权限管理,在6.0以下相机权限是默认为true,等到打开相机的activity就会弹出申请相机权限的弹窗。不知道是为什么?
请问该如何解决,谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.