Image Conversion

Image conversion on the fly with web request

Order

Conversion will be applied in same order as passed in request


Endpoint

POST or GET - /image/convert

Parameters

Image file need to be uploaded for conversion.

file required

File that need to be converted Allowed File size upto 100MB

Type - `Image File is required`

Default - `Null`

File Size

If uploaded file size exceed 100MB. Status Code 429 will be Return.

id optional

Required id from previous conversion if file is not being uploaded.

Example - `f864bc80-85b1-44b8-9264-43ba9ab19c37`

Default - `Null`

resize optional

This parameter is required to resize image by width , height parameter. Third parameter to maintain aspect ratio.

param format - `width`,`height`,`aspect_ratio`
`1 for true` to maintain aspect ratio and `0 for false`

Eg - `100,100,1` or `100,100,0`

blur optional

Needed to blur image by given amount.

param format - `amount`
`amount` should be between `0` and `100`

Eg - `5`

contrast optional

Increase or decrease contrast of image by given amount.

param format - `amount`
`amount` should be between `-100` and `100`

Eg - `20` or `-5`

brightness optional

Increase or decrease brightness of image by given amount.

param format - `amount`
`amount` should be between `-100` and `100`

Eg - `20` or `-5`

crop optional

Crop the given image by given amount of width height.

param format - `width,height,x_position,y_position`
`default` value of `x and y position` is `0,0`

Eg - `100,100` or `120,120,30,50`

flip optional

flip the given image horizontally or vertically. .

param format - `direction`
`h` for `horizontal` and `v` for `vertical` flip

Eg - `h` or `v`

gamma optional

change the gamma value of image by given amount.

param format - `amount`
`amount` can be any `integer or decimal`

Eg - `3` or `5.7`

greyscale optional

convert the image in black and white.

param format - `boolean`
`1` for `true` and `0` for `false` 

Eg - `1` or `0`

invert optional

invert the color of image.

param format - `boolean`
`1` for `true` and `0` for `false` 

Eg - `1` or `0`

opacity optional

change the gamma value of image by given amount.

param format - `amount`
`amount` can be between `0` to `100`

Eg - `3`

pixelate optional

change the image pixel size by given value.

param format - `amount`
`amount` can be any `integer` value

Eg - `6`

rotate optional

rotate the given image by given angel value.

param format - `angle,bg_color`
`angle` can be between `-360` to `360`
`bg_color` can be 'hex color'. Default is `#000000`

Eg - `40`

sharp optional

sharp the given image color by given value.

param format - `amount`
`amount` should be between `0` and `100`

Eg - `10`

format optional

Format for converted image.

param format - `format`
`format` can be `jpg` `jpeg` `png` `gif` `tiff` `webp`
`Default` format will be same as uploaded image

Eg - `png` `webp`

Example

With File Request

curl --form "file=@myimage.jpg&sharp=10&resize=400,200,1" https://oyyi.xyz/image/convert

Notes

File Storage

Original file and converted file are store only for 30 minutes on server Download converted file by given conversion Id.

Contributors: coder9118