Skip to content

Commit

Permalink
removed old overlay parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ANKUR DWIVEDI authored and ANKUR DWIVEDI committed Jan 18, 2024
1 parent 4deadda commit bbc1525
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 54 deletions.
27 changes: 0 additions & 27 deletions lib/imagekitio/constants/supported_transformation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,6 @@ module SupportedTransformation
'rotation': "rt",
'blur': "bl",
'named': "n",
'overlay_image': "oi",
'overlay_image_trim': "oit",
'overlay_image_cropping': "oic",
'overlay_image_quality': "oiq",
'overlay_image_DPR': "oidpr",
'overlay_image_border': "oib",
'overlay_image_background': "oibg",
'overlay_image_aspect_ratio': "oiar",
'overlay_x': "ox",
'overlay_y': "oy",
'overlay_focus': "ofo",
'overlay_height': "oh",
'overlay_width': "ow",
'overlay_text': "ot",
'overlay_text_font_size': "ots",
'overlay_text_font_family': "otf",
'overlay_text_encoded': "ote",
'overlay_text_color': "otc",
'overlay_text_width': "otw",
'overlay_text_background': "otbg",
'overlay_text_padding': "otp",
'overlay_text_inner_alignment': "otia",
'overlay_text_transparency': "oa",
'overlay_alpha': "oa",
'overlay_radius': "or",
'overlay_text_typography': "ott",
'overlay_background': "obg",
'progressive': "pr",
'lossless': "lo",
'trim': "t",
Expand Down
28 changes: 1 addition & 27 deletions test/imagekit/url_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,32 +158,6 @@
rotation: 90,
blur: 10,
named: "some_name",
overlay_x: 35,
overlay_y: 35,
overlay_focus: "bottom",
overlay_height: 20,
overlay_width: 20,
overlay_image: "/folder/file.jpg",
overlay_image_trim: false,
overlay_image_aspect_ratio: "4:3",
overlay_image_background: "0F0F0F",
overlay_image_border: "10_0F0F0F",
overlay_image_DPR: 2,
overlay_image_quality: 50,
overlay_image_cropping: "force",
overlay_text: "two words",
overlay_text_font_size: 20,
overlay_text_font_family: "Open Sans",
overlay_text_color: "00FFFF",
overlay_text_transparency: 5,
overlay_text_typography: "b",
overlay_background: "00AAFF55",
overlay_text_encoded: "b3ZlcmxheSBtYWRlIGVhc3k%3D",
overlay_text_width: 50,
overlay_text_background: "00AAFF55",
overlay_text_padding: 40,
overlay_text_inner_alignment: "left",
overlay_radius: 10,
progressive: true,
lossless: true,
trim: 5,
Expand All @@ -202,7 +176,7 @@
},]
}
url = url_obj.generate_url(options)
expect(url).to eq("https://imagekit.io/your-imgekit-id/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,ox-35,oy-35,ofo-bottom,oh-20,ow-20,oi-folder@@file.jpg,oit-false,oiar-4:3,oibg-0F0F0F,oib-10_0F0F0F,oidpr-2,oiq-50,oic-force,ot-two words,ots-20,otf-Open Sans,otc-00FFFF,oa-5,ott-b,obg-00AAFF55,ote-b3ZlcmxheSBtYWRlIGVhc3k%3D,otw-50,otbg-00AAFF55,otp-40,otia-left,or-10,pr-true,lo-true,t-5,md-true,cp-true,di-folder@@file.jpg,dpr-3,e-sharpen-10,e-usm-2-2-0.8-0.024,e-contrast-true,e-grayscale-true,e-shadow-bl-15_st-40_x-10_y-N5,e-gradient-from-red_to-white,orig-true,w-200,h-200/default-image.jpg")
expect(url).to eq("https://imagekit.io/your-imgekit-id/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,e-sharpen-10,e-usm-2-2-0.8-0.024,e-contrast-true,e-grayscale-true,e-shadow-bl-15_st-40_x-10_y-N5,e-gradient-from-red_to-white,orig-true,w-200,h-200/default-image.jpg")
end

it "test_generate_url_with_chained_transformation" do
Expand Down

0 comments on commit bbc1525

Please sign in to comment.