Image

The Image Module SDK is a robust and user-friendly tool designed to simplify image manipulation and enhancement within your applications. It brings a wide array of powerful image editing features to developers, allowing for complex transformations and effects with minimal coding effort. Whether you need to crop, rotate, flip, or add custom elements to images, this module provides the necessary capabilities in a streamlined and accessible manner.

Key Features:

  • Crop Image: Easily crop images to your desired aspect ratio and size, ensuring they fit perfectly within your design requirements.

  • Rotate Image: Adjust the orientation of images with simple roation functionality.

  • Flip Image: Flip images horizontally or vertically to achieve the desired effect.

  • Add Text on Image: Overlay text on images, with customizable font, size, color, and positioning.

  • Draw on Image: Utilize drawing tools to add shapes, lines, or freehand elements directly onto images.

The Image Module SDK is ideal for developers who want to incorporate advanced image editing features into their applications without the need for extensive coding or external libraries.

Adding Module

MAUI specific :

1. Configure NuGet Package Source

Add the TruVideo GitHub package source to your NuGet configuration. You can do this in two ways:

Option A: Using the .NET CLI

dotnet nuget add source https://nuget.pkg.github.com/Truvideo/index.json -n truvideo

Option B: Manually editing nuget.config

Create or edit the nuget.config file in your solution directory:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="truvideo" value="https://nuget.pkg.github.com/Truvideo/index.json" />
  </packageSources>
</configuration>

2. Configure GitHub Authentication

You need to configure your GitHub credentials to access the package feed. Add the following to your nuget.config file:

<packageSourceCredentials>
    <truvideo>
        <add key="Username" value="YOUR_GITHUB_USERNAME" />
        <add key="ClearTextPassword" value="YOUR_GITHUB_PAT" />
    </truvideo>
</packageSourceCredentials>

Replace:

  • YOUR_GITHUB_USERNAME with your GitHub username

  • YOUR_GITHUB_PAT with a GitHub Personal Access Token that has read:packages scope

Important: You must create a GitHub Personal Access Token with both repo and packages permissions. Without these specific permissions, package installation will fail. To create a token:

  1. Go to GitHub Settings > Developer Settings > Personal Access Tokens

  2. Generate a new token with at least repo and packages scopes

  3. Copy the token immediately as it won't be shown again

Note: Never commit your GitHub credentials to source control. Consider using environment variables or user-specific configuration files.

3. Install Required Packages

If you configured the package source manually, you need to install the required packages using the following commands:

Check latest version - Android , iOS

#for iOS 
dotnet add package TruVideoImageiOSBinding --version {version}

#for Android
dotnet add package TruVideoImageAndroidBinding --version {version}

4. Important Project Configuration

When implementing the SDK in your own application, make sure to add the following configuration to your .csproj file:

<PropertyGroup>
    <MtouchExtraArgs>--require-pinvoke-wrappers=true</MtouchExtraArgs>
    <Registrar>static</Registrar>
</PropertyGroup>

Last updated

Was this helpful?