Skip to content

Commit 8a96c55

Browse files
committed
feat(helper): add colorize transformation to supported transforms
1 parent efa4d19 commit 8a96c55

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/imagekitio/lib/helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"unsharp_mask": "e-usm",
8383
"gradient": "e-gradient",
8484
"color_replace": "cr",
85+
"colorize": "e-colorize",
8586
"distort": "e-distort",
8687
# Other flags & finishing
8788
"progressive": "pr",

tests/custom/url_generation/test_advanced_url_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,5 +291,5 @@ def test_should_generate_the_correct_url_with_many_transformations_including_vid
291291
}
292292
],
293293
)
294-
expected = "https://ik.imagekit.io/test_url_endpoint/test_path.jpg?tr=h-300,w-400,ar-4-3,q-40,c-force,cm-extract,fo-left,f-jpeg,r-50,bg-A94D34,b-5-A94D34,rt-90,bl-10,n-some_name,pr-true,lo-true,t-5,md-true,cp-true,di-folder@@file.jpg,dpr-3,x-10,y-20,xc-30,yc-40,fl-h,o-0.8,z-2,vc-h264,ac-aac,so-5,eo-15,du-10,sr-1440_1080,e-grayscale,e-upscale,e-retouch,e-genvar,e-dropshadow,e-changebg-prompt-car,e-edit-prompt-make it vintage,e-bgremove,e-contrast,e-shadow-bl-15_st-40_x-10_y-N5,e-sharpen-10,e-usm-2-2-0.8-0.024,e-gradient-from-red_to-white,cr-FF0000_10_0000FF,colorize-co-red_in-50,e-distort-p-10_20_100_20_100_200_10_200,orig-true,pg-2_4,h-200,w-300,l-image,i-logo.png,l-end"
294+
expected = "https://ik.imagekit.io/test_url_endpoint/test_path.jpg?tr=h-300,w-400,ar-4-3,q-40,c-force,cm-extract,fo-left,f-jpeg,r-50,bg-A94D34,b-5-A94D34,rt-90,bl-10,n-some_name,pr-true,lo-true,t-5,md-true,cp-true,di-folder@@file.jpg,dpr-3,x-10,y-20,xc-30,yc-40,fl-h,o-0.8,z-2,vc-h264,ac-aac,so-5,eo-15,du-10,sr-1440_1080,e-grayscale,e-upscale,e-retouch,e-genvar,e-dropshadow,e-changebg-prompt-car,e-edit-prompt-make it vintage,e-bgremove,e-contrast,e-shadow-bl-15_st-40_x-10_y-N5,e-sharpen-10,e-usm-2-2-0.8-0.024,e-gradient-from-red_to-white,cr-FF0000_10_0000FF,e-colorize-co-red_in-50,e-distort-p-10_20_100_20_100_200_10_200,orig-true,pg-2_4,h-200,w-300,l-image,i-logo.png,l-end"
295295
assert url == expected

0 commit comments

Comments
 (0)