Skip to content

Image Picker

Image Picker Image Picker Image Picker

Controls the image selection interface, allowing users to pick photos, take new ones, use predefined models, or access previous uploads.

ImagePickerFeature {
  camera: ImagePickerCameraFeature | null // (1)!
  photoGallery: ImagePickerPhotoGalleryFeature // (2)!
  predefinedModels: ImagePickerPredefinedModelFeature | null // (3)!
  protectionDisclaimer: ImagePickerProtectionDisclaimerFeature | null // (4)!
  uploadsHistory: ImagePickerUploadsHistoryFeature | null // (5)!

  images {
    examples: List<Image> // (6)!
  }

  strings {
    imagePickerTitleEmpty: String // (7)!
    imagePickerDescriptionEmpty: String // (8)!
    imagePickerButtonUploadImage: String // (9)!
  }
}
  1. Configuration for camera functionality, allowing users to take new photos directly within the SDK.
  2. Configuration for accessing and selecting images from the device's photo library.
  3. Configuration for using predefined model images as an alternative to user photos.
  4. Optional disclaimer informing users about photo privacy and protection.
  5. Configuration for managing and reusing previously uploaded images.
  6. List of exactly 2 example of input images to display in the image picker interface.
  7. Title text displayed above images when the image picker is empty.
  8. Description text shown when the image picker is empty.
  9. Label text for the button used to upload new photos.

Sequence Diagrams

Detailed sequence of the user selecting the source image for the virtual try-on.

sequenceDiagram
    autonumber
    actor USR as ⠀<br>User
    participant APP as Your<br>App
    participant BE as Your<br>Backend
    participant SDK as Aiuta<br>SDK
    participant API as Aiuta<br>Backend
    participant GS as Storage
    note over GS: Aiuta or Yours

    USR->>APP: Tap Try-on Button
    APP->>SDK: Start Try-on (Product)
    activate SDK
    SDK-->>USR: Present SDK UI

    USR->>SDK: Select / take a new photo
    SDK->>API: Upload a photo
    activate API
    API->>GS: Save input image
    Note over API,GS: Anonymous.<br>The photo is associated with the<br>app entry, not the user entry
    API->>API: Generate image ID, form URL
    API-->>SDK: Return image ID, URL
    deactivate API

    SDK->>SDK: Start Try-on (Image)
    deactivate SDK
sequenceDiagram
    autonumber
    actor USR as ⠀<br>User
    participant APP as Your<br>App
    participant BE as Your<br>Backend
    participant SDK as Aiuta<br>SDK
    participant API as Aiuta<br>Backend
    participant GS as Storage
    note over GS: Aiuta or Yours

    USR->>APP: Tap Try-on Button
    APP->>SDK: Start Try-on (Product)
    activate SDK
    SDK-->>USR: Present SDK UI

    USR->>SDK: Select model / previously used photo
    SDK->>SDK: Add/Reorder image in the history
    Note right of SDK: Using the image ID

    SDK->>SDK: Start Try-on (Image)
    deactivate SDK

Detailed sequence of the user selecting the source image for the virtual try-on with custom configuration.

sequenceDiagram
    autonumber
    actor USR as ⠀<br>User
    participant APP as Your<br>App
    participant BE as Your<br>Backend
    participant SDK as Aiuta<br>SDK
    participant API as Aiuta<br>Backend
    participant GS as Storage
    note over GS: Aiuta or Yours

    USR->>APP: Tap Try-on Button
    APP->>SDK: Start Try-on (Product)
    activate SDK
    SDK-->>USR: Present SDK UI

    USR->>SDK: Tap upload a photo
    SDK->>SDK: Check consent obtained
    opt consent required
        SDK-->>USR: Present consent page
        USR->>SDK: Accept consent terms
        SDK->>APP: Call obtainConsentIds (consent IDs)
        APP->>BE: Store consents obtained
    end

    SDK-->>USR: Show options for uploading
    USR->>SDK: Select/take a new photo
    SDK->>API: Upload a photo
    activate API
    API->>GS: Save input image
    Note over API,GS: Anonymous.<br>The photo is associated with the<br>app entry, not the user entry
    API->>API: Generate image ID, form URL
    API-->>SDK: Return image ID, URL
    deactivate API

    SDK->>SDK: Start Try-on (Image)
    deactivate SDK
sequenceDiagram
    autonumber
    actor USR as ⠀<br>User
    participant APP as Your<br>App
    participant BE as Your<br>Backend
    participant SDK as Aiuta<br>SDK
    participant API as Aiuta<br>Backend
    participant GS as Storage
    note over GS: Aiuta or Yours

    USR->>APP: Tap Try-on Button
    APP->>SDK: Start Try-on (Product)
    activate SDK
    SDK-->>USR: Present SDK UI

    USR->>SDK: Select model / previously used photo
    SDK->>APP: Add/Select image in the history
    APP->>BE: Update uploads history
    Note over APP,BE: Recent image first in the list
    APP-->>SDK: Update data provider observable list

    SDK->>SDK: Start Try-on (Image)
    deactivate SDK