Skip to content

Extract#190

Merged
colbyfayock merged 2 commits intomainfrom
feat/168-extract
Aug 28, 2024
Merged

Extract#190
colbyfayock merged 2 commits intomainfrom
feat/168-extract

Conversation

@colbyfayock
Copy link
Collaborator

@colbyfayock colbyfayock commented Aug 28, 2024

Description

Adds Extract feature that allows you to "extract" or remove the background from around an object by using a prompt.

https://cloudinary.com/documentation/transformation_reference#e_extract

Syntax:

// String
extract="space jellyfish"

// Array of strings
extract={{
  prompt: ['space jellyfish', 'octocat'],
}}

// Object
extract={{
  prompt: 'space jellyfish',
  multiple: true,
  mode: 'mask', 
  invert: true
}}


// Object with prompt array
extract={{
  prompt: ['space jellyfish', 'octocat'],
  mode: 'mask', 
}}

Issue Ticket Number

Fixes #168

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Fix or improve the documentation
  • This change requires a documentation update

Checklist

  • I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
  • I have created an issue ticket for this PR
  • I have checked to ensure there aren't other open Pull Requests for the same update/change?
  • I have performed a self-review of my own code
  • I have run tests locally to ensure they all pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes needed to the documentation

@colbyfayock colbyfayock merged commit 3b0896f into main Aug 28, 2024
@colbyfayock colbyfayock deleted the feat/168-extract branch August 28, 2024 16:33
github-actions bot pushed a commit that referenced this pull request Aug 28, 2024
@github-actions
Copy link

🎉 This PR is included in version @cloudinary-util/url-loader-v5.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

colbyfayock added a commit to cloudinary-community/next-cloudinary that referenced this pull request Aug 28, 2024
# Description

Adds support for Extract feature via URL Loader update.

Adds documentation for feature.

cloudinary-community/cloudinary-util#190
https://cloudinary.com/documentation/transformation_reference#e_extract

## Usage

```
// String
extract="space jellyfish"

// Array of strings
extract={{
  prompt: ['space jellyfish', 'octocat'],
}}

// Object
extract={{
  prompt: 'space jellyfish',
  multiple: true,
  mode: 'mask', 
  invert: true
}}


// Object with prompt array
extract={{
  prompt: ['space jellyfish', 'octocat'],
  mode: 'mask', 
}}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Extract

1 participant