Giter Site home page Giter Site logo

yunus6116 / image_watermark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saurabh-m-w/image_watermark

0.0 0.0 0.0 12.37 MB

image_watermark flutter pacakge https://pub.dev/packages/image_watermark

License: MIT License

Objective-C 0.21% Kotlin 0.69% Dart 67.72% Swift 2.24% HTML 21.32% Ruby 7.83%

image_watermark's Introduction

image_watermark

Languages:

Spanish

Image watermark is flutter pacakge to add text watermark and image watermark on image,you can customize the position of watermark and color. Based on Image pacakge.
Check on pub.dev: https://pub.dev/packages/image_watermark

Example code

Add watermark text at center of image,parameter image bytes and string and it returns image bytes

final watermarkedImg = await ImageWatermark.addTextWatermarkCentered(
  imgBytes: imgBytes,
  watermarktext: 'watermarkText',
  );
final watermarkedImgBytes = await ImageWatermark.addTextWatermarkCentered(
                        imgBytes: imgBytes, ///image bytes
                        watermarktext: 'watermarkText', ///watermark text
                        color: Colors.white, ///default : Colors.black
                      );

Change the position of watermark

final watermarkedImg = await ImageWatermark.addTextWatermark(
                          imgBytes: imgBytes,             ///image bytes
                          watermarktext: 'watermarkText',      ///watermark text
                          dstX: 20,                   ///position of watermark x coordinate
                          dstY: 30,                   ///y coordinate
                          color: Colors.green, ///default : Colors.black
                        )

Add image as watermark on image

final watermarkedImgBytes = await ImageWatermark.addImageWatermark(
  originalImageBytes: imgBytes,
  waterkmarkImageBytes: watermarkImgByte,
  );
final watermarkedImgBytes = await ImageWatermark.addImageWatermark(
                              originalImageBytes: imgBytes,  //image bytes
                              waterkmarkImageBytes: imgBytes2, //watermark img bytes
                              imgHeight: 200,   //watermark img height
                              imgWidth: 200,    //watermark img width
                              dstY: 400,
                              dstX: 400,
                              );

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.