locked
Is it possible to add a watermark (Image) on image while taking image from xamarin app? RRS feed

  • Question

  • User396859 posted

    Hello There,

    I am looking possible way to add a watermark (image at one corner) while taking live photo from xamarin app or saving image to gallery from xamarin app?

    Could you please provide any information.

    Thank you

    Thursday, September 17, 2020 2:17 AM

Answers

  • User371688 posted

    For this, you can try to use DependencyService to achieve this function.

    The DependencyService class is a service locator that enables Xamarin.Forms applications to invoke native platform functionality from shared code.

    For more details, you can check document: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/dependency-service/introduction

    And there is a sample about this, you can refer to it here. https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/dependencyservice/

    Hope it can help you.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, September 21, 2020 6:33 AM
  • User371688 posted

    Thanks for your supporting xamarin.

    If my reply is useful for you, could you please mark it as answered? Thanks in advance. :)

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, September 24, 2020 1:39 AM

All replies

  • User371688 posted

    For android watermark, you could refer to:https://stackoverflow.com/questions/45774523/xamrin-android-add-image-watermark/45775848#45775848

    For ios, you can check:https://stackoverflow.com/questions/48513275/xamarin-ios-image-on-image-watermark

    Hope it can help you.

    Thursday, September 17, 2020 3:08 AM
  • User396859 posted

    I am currently using Xam.Plugin.Media in myPCL, iOS and Android Project for taking live photos (using app only). My question is, is it possible to achieve adding a watermark to the image (while or after taking image ) from this pluggin ? github.com/jamesmontemagno/MediaPlugin

    Friday, September 18, 2020 3:27 PM
  • User371688 posted

    For this, you can try to use DependencyService to achieve this function.

    The DependencyService class is a service locator that enables Xamarin.Forms applications to invoke native platform functionality from shared code.

    For more details, you can check document: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/dependency-service/introduction

    And there is a sample about this, you can refer to it here. https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/dependencyservice/

    Hope it can help you.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, September 21, 2020 6:33 AM
  • User371688 posted

    Hi @sahith009 , have you resolved your question?

    Thursday, September 24, 2020 1:33 AM
  • User396859 posted

    Thank you for checking with me! I am working on creating dependency service Android and so far it looks good. I will update you accordingly. Thank you

    Thursday, September 24, 2020 1:35 AM
  • User371688 posted

    Thanks for your supporting xamarin.

    If my reply is useful for you, could you please mark it as answered? Thanks in advance. :)

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, September 24, 2020 1:39 AM