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

Run this command:

With Flutter:

 $ flutter pub add truvideo_image_sdk

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  truvideo_image_sdk: ^0.0.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:truvideo_core_sdk/truvideo_image_sdk.dart';

For Android :

Ensure the inclusion of the jitpack repository in the android/build. gradle file

allprojects {
    repositories {
        google()
        mavenCentral()
        maven {
            url 'https://jitpack.io'
        }
    }
}

NDK and SDK Version Requirements

  1. NDK Version: The Truvideo SDK requires a minimum NDK version of 27.0.12077973 or above.

  2. SDK Version Error: The minimum Android SDK version required is 24.

Update the NDK Version in android/app/build.gradle file.

android {
    ndkVersion "27.0.12077973"
    // Other configurations...
}

Set the Minimum SDK Version in android/app/build.gradle file.

android {
    defaultConfig {
        minSdk 24
        // Other configurations...
    }
}

For iOS :

Add a dependency for the core module in Swift Package Manager get latest version.

https://github.com/Truvideo/truvideo-sdk-ios-image

To add a dependency for the core module in Swift Package Manager, follow these steps:

  1. Open your Xcode project.

  2. Navigate to the "File" menu and select "Swift Packages" -> "Add Package Dependency..."

  3. In the dialog that appears, enter the URL of the package repository containing the core module.

  4. In the next step, you'll be prompted to choose the version, branch, or commit of the package you want to use. Select the appropriate option and click "Next."

  5. Xcode will then resolve the package and its dependencies.

  6. In the "Add package product to your App" dialog, make sure that the core module is selected and added to your app's target.

  7. Click on the "Finish" button to add the dependency.

For detailed instructions, you can refer to the Swift Package Manager documentation provided by Apple here.

Last updated

Was this helpful?