{"id":15638049,"url":"https://github.com/janishar/paracamera","last_synced_at":"2025-08-20T12:31:10.988Z","repository":{"id":94553584,"uuid":"64389791","full_name":"janishar/ParaCamera","owner":"janishar","description":"Simple android camera to take and get image bitmaps","archived":false,"fork":false,"pushed_at":"2023-10-09T08:49:58.000Z","size":419,"stargazers_count":96,"open_issues_count":16,"forks_count":45,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-10T00:40:22.248Z","etag":null,"topics":["android-camera","bitmap","camera","capture"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janishar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-07-28T11:24:33.000Z","updated_at":"2024-01-19T09:47:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"69323e6f-1fd5-44dd-9a78-136776706a1a","html_url":"https://github.com/janishar/ParaCamera","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janishar%2FParaCamera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janishar%2FParaCamera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janishar%2FParaCamera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janishar%2FParaCamera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janishar","download_url":"https://codeload.github.com/janishar/ParaCamera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230423559,"owners_count":18223435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-camera","bitmap","camera","capture"],"created_at":"2024-10-03T11:17:14.218Z","updated_at":"2024-12-19T11:11:50.009Z","avatar_url":"https://github.com/janishar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ParaCamera\n[ ![Download](https://api.bintray.com/packages/janishar/mindorks/paracamera/images/download.svg) ](https://bintray.com/janishar/mindorks/paracamera/_latestVersion)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ParaCamera-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/4415)\n\n## Simple android camera to capture and get bitmaps in three simple steps:\n\n## 1. Build Camera\n```java\n// Create global camera reference in an activity or fragment\nCamera camera;\n\n// Build the camera   \ncamera = new Camera.Builder()\n                .resetToCorrectOrientation(true)// it will rotate the camera bitmap to the correct orientation from meta data\n                .setTakePhotoRequestCode(1)\n                .setDirectory(\"pics\")\n                .setName(\"ali_\" + System.currentTimeMillis())\n                .setImageFormat(Camera.IMAGE_JPEG)\n                .setCompression(75)\n                .setImageHeight(1000)// it will try to achieve this height as close as possible maintaining the aspect ratio; \n                .build(this);\n```\n## 2. Capture Image\n```java\n// Call the camera takePicture method to open the existing camera             \n        try {\n            camera.takePicture();\n        }catch (Exception e){\n            e.printStackTrace();\n        }\n```\n## 3. Get bitmap and saved image path\n```java\n// Get the bitmap and image path onActivityResult of an activity or fragment\n    @Override\n    protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n        super.onActivityResult(requestCode, resultCode, data);\n        if(requestCode == Camera.REQUEST_TAKE_PHOTO){\n            Bitmap bitmap = camera.getCameraBitmap();\n            if(bitmap != null) {\n                picFrame.setImageBitmap(bitmap);\n            }else{\n                Toast.makeText(this.getApplicationContext(),\"Picture not taken!\",Toast.LENGTH_SHORT).show();\n            }\n        }\n    }   \n```\n```java\n// The bitmap is saved in the app's folder\n//  If the saved bitmap is not required use following code\n    @Override\n    protected void onDestroy() {\n        super.onDestroy();\n        camera.deleteImage();\n    }\n```\n\n# Gradle\n```groovy\nimplementation 'com.mindorks:paracamera:0.2.2'\n```\n\n### WRITE_EXTERNAL_STORAGE is required\n```xml\n\u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" /\u003e\n```\n\n# About The Author\nYou can connect with me here:\n* [Twitter](https://twitter.com/janisharali)\n* [YouTube Channel](https://www.youtube.com/@unusualcode)\n* [LinkedIn](https://www.linkedin.com/in/janishar-ali)\n* [Instagram](https://www.instagram.com/janisharali)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanishar%2Fparacamera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanishar%2Fparacamera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanishar%2Fparacamera/lists"}