GithubHelp home page GithubHelp logo

image-reducer-api's Introduction

Image Reducer Api

Table of content

Introduction API URL Reduce Endpoint Conclusion

Introduction

  • Welcome to the documentation for the image reducer api. This API allows you to resize images by specifying the desired width and height as a search params and a payload is the image base64 format.

API URL

The base URL for the API is: https://api.example.com

Reduce Endpoint

Endpoint

/reduce

Method

POST

Request Payload

The request payload should be sent as a base64 encoded string representing the image file. The payload should be sent in the body of the POST request.

Parameters

Parameter Type Required Description
width string Yes The desired width of the image.
height string Yes The desired height of the image.
image string Yes The base64 encoded image file.

Example Request

  POST /reduce?width='300'&height='200'

  Content-type: application/json

  {
    "image": "base64-encoded-image-string"
  }

Example Response

{
  "status": "success",
  "message": "Image resized successfully",
  "data": "base64-encoded-image-string"
}

Response Codes

Status Code Description
200 Successful resize operation.
400 Bad request. Missing parameters
500 Internal server error.

Error Response

  {
    "status": "error",
    "message": "Invalid parameter: width must be a positive number"
  }

Conclusion

The Image Reduce API provides a simple and convenient way to resize images by providing the desired width and height along with the base64 encoded image file. It returns image base64 encoded as well. Please make sure to handle any error responses as described above.

If you have any questions or need further assistance, please contact our support team at [email protected]

image-reducer-api's People

Contributors

blacksnowsoon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.