Luw.ai API
  • Luw.ai API Documentation
    • Introduction
      • Getting Started
      • API Reference
      • Authentication
      • Error Handling
      • Rate Limit and Quotas
      • Get Process Results
      • Uploading Files
    • Generators
      • Interior AI
      • Exterior AI
      • Sketch AI
      • Magic Prompt AI
      • Mood Board AI
      • Magic Wand AI
      • Enhance AI
      • Remove Furniture AI
      • Segment AI
      • ArchiGPT
      • Motion AI
      • Video AI
      • Fluw AI
      • Fluw Vector AI
      • 3DGen AI
      • Pattern AI
      • Change Background AI
    • Knowledge
      • Design Styles
      • Video Styles
      • Interior Types
      • Exterior Types
      • Mood Board Types
      • Magic Wand Materials
      • What is Mask Image?
      • Precision Levels
    • Personas
      • Persona Endpoints
      • Training Endpoints
      • Like a Design
      • Persona Slots
    • Projects API
Powered by GitBook
On this page
  • Original vs Masked Images
  • Creating a Masked Image
  • Developer Tools
  • React
  • Vue
  • Angular
  • Mobile Cross-Platform
  • iOS/Swift
  1. Luw.ai API Documentation
  2. Knowledge

What is Mask Image?

A masked image is a black and white image that tells Luw.ai generators to which areas to change.

PreviousMagic Wand MaterialsNextPrecision Levels

Last updated 4 months ago

Think of it like a stencil - white areas will be changed, while black areas stay protected. This technique gives you precise control over where edits appear in your image. It must be the same size with the image you provided.

Original vs Masked Images

  • Image: Your normal photo with objects like chairs, mirrors, lamps, or pillows

  • Masked Image: A black and white version where:

    • White: Areas you want to edit

    • Black: Areas you want to leave alone

Creating a Masked Image

Visit to create your mask:

  1. Upload your photo

  2. Mark areas using either:

    • The brush tool to paint manually

    • AI detection to automatically select objects

  3. Click "Download"

Developer Tools

If you're building with an application using Magic Wand, you'll need to handle masked images. Here are recommended tools:

React

  1. react-canvas-draw

  • Simple mask drawing

  • React optimized

  • Easy to integrate

  1. react-sketch-canvas

  • Touch friendly

  • Clean mask output

  • React hooks ready

  1. react-konva

  • Powerful canvas control

  • React components

  • Most popular option

Vue

  1. vue-konva

  • Vue 3 compatible

  • Similar to react-konva

  • Full mask features

  1. v-canvas

  • Lightweight drawing

  • Vue optimized

  • Simple masking

Angular

  1. ng2-canvas-whiteboard

  • Angular focused

  • Touch support

  • Mask export

  1. konva-angular

  • Feature rich

  • TypeScript ready

  • Professional grade

Mobile Cross-Platform

  1. React Native Skia

  • Native performance

  • Cross platform

  1. Flutter Custom Paint

  • Clean mask drawing

  • Touch optimized

iOS/Swift

  1. PencilKit

  • Drawing optimized

  • Mask export

Pick based on needs:

  • React → react-sketch-canvas

  • Vue → vue-konva

  • Angular → konva-angular

  • React Native → React Native Skia

  • Flutter → Custom Paint

  • iOS → PencilKit

note: add extra methods like soften to 3d, seed to non seed models etc..

beta.luw.ai/magicwand?mask_export=true