Skip to content

Simple Watermark Library to Android, converting XML (VIEW) to bitmap

Notifications You must be signed in to change notification settings

duanniston/watermark

Repository files navigation

Watermark Library to Android

 repositories {
    jcenter()
 }
implementation 'br.com.duanniston:watermarklib:0.0.5'

minSdkVersion 16

Usage

Generating watermark from XML (view)

private Bitmap generateWaterMark(Bitmap src) {

 //src is your original image
 WaterMark waterMark = new WaterMark(mContext);
 //return the your original image with watermark added
 return waterMark.getImageWaterMarkFromView(src, R.layout.watermark_all);
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:gravity="center"
    android:orientation="vertical">

<TextView
        android:layout_width="match_parent"
        android:layout_gravity="center"
        android:gravity="center"
        android:layout_height="match_parent"
        android:text="watermark" />
</LinearLayout>

Licence

Copyright 2016 Duanniston Cabral

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

Simple Watermark Library to Android, converting XML (VIEW) to bitmap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages