File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,14 @@ describe('Tests for Transformation Action -- Effect', () => {
152152 expect ( url ) . toBe ( 'https://res.cloudinary.com/demo/image/upload/e_art:peacock/sample' ) ;
153153 } ) ;
154154
155+ it ( 'Can use shortened artisticFilter notation' , ( ) => {
156+ const url = createNewImage ( 'sample' )
157+ . effect ( Effect . artisticFilter ( "al_dente" ) )
158+ . toURL ( ) ;
159+
160+ expect ( url ) . toBe ( 'https://res.cloudinary.com/demo/image/upload/e_art:al_dente/sample' ) ;
161+ } ) ;
162+
155163 it ( 'Creates a cloudinaryURL with effect cartoonify:50' , ( ) => {
156164 const url = createNewImage ( 'sample' )
157165 . effect ( cartoonify ( ) . lineStrength ( 50 ) . blackwhite ( ) )
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import {FadeInEffectAction} from "./effect/leveled/fadeIn";
2424import { RemoveBackgroundAction } from "./effect/removeBackgroundAction" ;
2525import { ThemeEffect } from "./effect/theme" ;
2626import { SystemColors } from "../qualifiers/color" ;
27+ import { ArtisticFilterType } from "../types/types" ;
2728
2829
2930/**
@@ -101,10 +102,10 @@ function oilPaint(oilPaintLevel?: number):EffectActionWithStrength {
101102 * @summary action
102103 * @description Applies an artistic filter to the asset.
103104 * @memberOf Actions.Effect
104- * @param artisticFilterType
105+ * @param { ArtisticFilterType | string } artisticFilterType
105106 * @return {Actions.Effect.SimpleEffectAction }
106107 */
107- function artisticFilter ( artisticFilterType : string ) :SimpleEffectAction {
108+ function artisticFilter ( artisticFilterType : ArtisticFilterType | string ) :SimpleEffectAction {
108109 return new SimpleEffectAction ( 'art' , artisticFilterType ) ;
109110}
110111
Original file line number Diff line number Diff line change @@ -284,6 +284,29 @@ export type VideoFormatType =
284284
285285export type AnimatedFormatType = "auto" | "gif" | "webp" | "png" ;
286286
287+ export type ArtisticFilterType =
288+ "al_dente" |
289+ "athena" |
290+ "audrey" |
291+ "aurora" |
292+ "daguerre" |
293+ "eucalyptus" |
294+ "hairspray" |
295+ "hokusai" |
296+ "peacock" |
297+ "primavera" |
298+ "quartz" |
299+ "incognito" |
300+ "red_rock" |
301+ "sizzle" |
302+ "fes" |
303+ "linen" |
304+ "refresh" |
305+ "sonnet" |
306+ "ukulele" |
307+ "frost" |
308+ "zorro" ;
309+
287310export interface LegacyITransforamtionOptions {
288311 transformation ?: LegacyITransforamtionOptions | string ;
289312 raw_transformation ?: string ;
You can’t perform that action at this time.
0 commit comments