{"id":13396286,"url":"https://github.com/sharish/BitmapMerger","last_synced_at":"2025-03-13T22:32:03.848Z","repository":{"id":99658204,"uuid":"38324286","full_name":"sharish/BitmapMerger","owner":"sharish","description":"Play with bitmaps","archived":false,"fork":false,"pushed_at":"2018-05-06T17:11:00.000Z","size":216,"stargazers_count":459,"open_issues_count":2,"forks_count":70,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-08-07T11:11:10.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-06-30T17:53:00.000Z","updated_at":"2024-03-07T23:09:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"91c94524-a691-4f9d-8634-a0292ea3887c","html_url":"https://github.com/sharish/BitmapMerger","commit_stats":null,"previous_names":["cooltechworks/bitmapmerger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharish%2FBitmapMerger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharish%2FBitmapMerger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharish%2FBitmapMerger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharish%2FBitmapMerger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharish","download_url":"https://codeload.github.com/sharish/BitmapMerger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221417371,"owners_count":16816873,"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":[],"created_at":"2024-07-30T18:00:43.872Z","updated_at":"2024-10-25T10:32:02.490Z","avatar_url":"https://github.com/sharish.png","language":"Java","readme":"\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-BitmapMerger-green.svg?style=flat)](https://android-arsenal.com/details/1/2085) [![Travis CI](https://api.travis-ci.org/cooltechworks/BitmapMerger.svg?branch=master)](https://travis-ci.org/cooltechworks/BitmapMerger/)\n\n\n# BitmapMerger\nBitmap Merger is a simple project help you to merge two bitmaps without memory exceptions. The bitmaps are processed in background threads thereby taking the\nload away from UI thread. Along with merge, it also contains the image decoder for decoding images from resources/disk and are sampled\nto prevent OutOfMemoryError. \n\nExamples of Bitmap Merger with this project\n\nMerging at angle away | Merging at center | Merging with offsets\n------------ | ------------- | -------------\n![merge_angle_small](https://cloud.githubusercontent.com/assets/13122232/8438305/9f7c2644-1f82-11e5-8f51-25ba7cca0711.gif) | ![merge_at_center_small](https://cloud.githubusercontent.com/assets/13122232/8438306/9f83ee9c-1f82-11e5-8734-954a13f1b2f2.gif) | ![merge_offset_small](https://cloud.githubusercontent.com/assets/13122232/8438307/9f8d7c78-1f82-11e5-8d77-7fb9f31dfd6f.gif)\nMoon moving around the earth for various angles | Stamp at center of the document being scaled | Balloon flying in a beach with various offset values\n\n\n###Usage :\n\n####Merging at angle away\n\n```java\nint angle = 90; // your angle here\nfloat scale = 0.5f; // scaling option for merging the image\nBitmap baseBitmap; // your base bitmap here\nBitmap mergeBitmap; // your merging bitmap here\nImageView imgView; // your image view for displaying the merged bitmaps.\nBitmapMergerTask task = new BitmapMergerTask();\n            task.setBaseBitmap(baseBitmap)\n                    .setMergeBitmap(mergeBitmap)\n                    .setMergeListener(new BitmapMergerTask.OnMergeListener() {\n                        @Override\n                        public void onMerge(BitmapMergerTask task, Bitmap mergedBitmap) {\n                            if(imgView != null) {\n                              imgView.setImageBitmap(mergedBitmap);\n                            }\n                        }\n                    })\n                    .setScale(scale)\n                    .setAngle(angle)\n                    .merge();\n\n```\n\n####Merging at center\n\n```java\nfloat scale = 0.5f; // scaling option for merging the image\nBitmap baseBitmap; // your base bitmap here\nBitmap mergeBitmap; // your merging bitmap here\nImageView imgView; // your image view for displaying the merged bitmaps.\nBitmapMergerTask task = new BitmapMergerTask();\n            task.setBaseBitmap(baseBitmap)\n                    .setMergeBitmap(mergeBitmap)\n                    .setMergeListener(new BitmapMergerTask.OnMergeListener() {\n                        @Override\n                        public void onMerge(BitmapMergerTask task, Bitmap mergedBitmap) {\n                            if(imgView != null) {\n                              imgView.setImageBitmap(mergedBitmap);\n                            }\n                        }\n                    })\n                    .setScale(scale)\n                    .merge();\n\n```\n\n####Merging with offsets from top left\n\n```java\nint leftOffset = 0; // your left offset in pixels\nint topOffset = 0; // your top offset in pixels\nfloat scale = 0.5f; // scaling option for merging the image\nBitmap baseBitmap; // your base bitmap here\nBitmap mergeBitmap; // your merging bitmap here\nImageView imgView; // your image view for displaying the merged bitmaps.\nBitmapMergerTask task = new BitmapMergerTask();\n            task.setBaseBitmap(baseBitmap)\n                    .setMergeBitmap(mergeBitmap)\n                    .setMergeListener(new BitmapMergerTask.OnMergeListener() {\n                        @Override\n                        public void onMerge(BitmapMergerTask task, Bitmap mergedBitmap) {\n                            if(imgView != null) {\n                              imgView.setImageBitmap(mergedBitmap);\n                            }\n                        }\n                    })\n                    .setScale(scale)\n                    .setOffsets(leftOffset,topOffset)\n                    .merge();\n\n```\n\nDeveloped By\n============\n\n* Harish Sridharan - \u003charish.sridhar@gmail.com\u003e\n\n\n\n\n\n","funding_links":[],"categories":["Index `(light-weight pages)`","Index"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharish%2FBitmapMerger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharish%2FBitmapMerger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharish%2FBitmapMerger/lists"}