Skip to content

An Android library that makes it very easy and quick to save any View or ViewGroup as an image to the gallery.

License

Notifications You must be signed in to change notification settings

MuhammadAmmad/ViewToBitmap

Repository files navigation

ViewToBitmap

An Android library that makes it very easy and very quick to save any View or ViewGroup as an image to the gallery.
Perfect for photofiltre, quotes and drawing apps!

Currentely used in [Quote Creator] (https://play.google.com/store/apps/details?id=org.m.muddzboy.QuoteCreator&hl=da) with +80.000 downloads!

Features

  • The library saves in an AsyncTask
  • Options to save Bitmaps in the formats: .JPG .PNG .nomedia
  • Option to put quality variable for JPG formats
  • Optional listener that gives you a boolean value and String path when/if the image is saved
  • Set the name of the Bitmap files and folders. They have by default a timestamp as name for each save
  • Support from API 16+

Example of simple usage

    ViewToBitmap toBitmap = new ViewToBitmap(this, drawingBoard, "My folder name");
    toBitmap.saveToBitmap();  

Installation

Add the depedency in your build.gradle. The library is distributed via jCenter

dependencies {
    compile 'com.muddzdev:viewtobitmap:1.0.4'    
}

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

An Android library that makes it very easy and quick to save any View or ViewGroup as an image to the gallery.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages