Image Resizer from url.
.Maui Image Resizer API to resize images from URL.
POSTGET *https://api.dotmaui.com/client/1.1/imgresize/
Parameters
Field | Type | Description | Required |
---|---|---|---|
apikey | String |
.Maui Api key |
True |
url | String |
A valid URL to an image |
True |
width | Integer |
New image width |
1 |
height | Integer |
New image height |
1 |
mode | String |
Accepted values are:
|
False |
name | String |
It will be the name of the new image, it must contain the extension |
2 |
quality | Integer |
Quality of the new image, it must be a numeric value between 1 and 100. The default value is 80 |
False |
grayscale | Boolean |
Converts the image to black and white. Default is false |
False |
flip | Boolean |
Flips the image vertically. Default is false |
False |
flop | Boolean |
Create a mirror version of the image. Default is false |
False |
blur | Integer |
Blur the image. Integer values from 1 and up are allowed. The higher the value, the blurrier the image will be. Default is 0 |
False |
1 Both can be specified, but at least one is mandatory. If either of them is omitted, the new image will retain proportions with the original image.
2 Optional in CDN mode, in default mode this parameter is ignored.
Success 200 - Default Mode
It will be the resized image
Success 200 - CDN Mode
Field | Type | Description |
---|---|---|
url | String |
The url where the minimized file was saved |
size | Integer |
File size in bytes |
UID | String |
Unique alphanumeric ID in the .Maui CDN |
HTTP/1.1 200 OK { "url": "https://cdn.dotmaui.com/dotmaui/img/android-chrome-192x192.png", "size": 4720, "UID": "JOicnO" }
Testing calls
You can try this service through our API-based tool available here: https://dotmaui.com/api-powered/imgresize.jsp
Examples
import urllib.parse import urllib.request img_url = "https://dotmaui.com/android-chrome-192x192.png" path_thumb= "C:\\Users\\User\\Pictures\\thumb.png" params = urllib.parse.urlencode({'apikey': 'YOUR_API_KEY', 'width': 133,'height': 133, 'url': img_url}).encode("utf-8") urllib.request.urlretrieve("https://api.dotmaui.com/client/1.1/imgresize/", path_thumb, data = params)