API Endpoint Access URL
https://api.pixlab.io/orderedposterize
Get Your API Key & Try ORDEREDPOSTERIZE Now ↗Description
Perform ordered dithering with predefined threshold maps over multiple intensity levels, customizable for different channels. Ideal for developers and creators seeking advanced image processing capabilities. Performs an ordered dither based on a number of predefined dithering threshold maps, but over multiple intensity levels, which can be different for different channels, according to the input arguments.
HTTP Methods
GET, POST
HTTP Parameters
Required
Fields | Type | Description |
---|---|---|
img |
URL | Input image URL. If you want to upload your image directly from your app, then submit a multipart/form-data POST request. |
type |
String | A string containing the name of the threshold dither map to use. |
key |
String | Your PixLab API Key ↗. You can also embed your key in the WWW-Authenticate: HTTP header and omit this parameter if you want to. |
Optional
Fields | Type | Description |
---|---|---|
blob |
Boolean | By default, this API endpoint returns a JSON Object holding the link to the image output. If set to true, the image binary contents are returned instead. |
channel |
Integer | Color channel constant. If omitted (recommended), all image channels will be affected (see below for channel constants). |
POST Request Body
If using POST instead of GET, specify one of these Content-Type headers:
multipart/form-data
application/json
To facilitate direct image uploads, utilize multipart/form-data
. Please consult the REST API code samples for a functional implementation. For JSON requests, the image must be pre-uploaded. Call store to upload images before invoking this endpoint.
Channels Constant
Recommended to omit this parameter and let PixLab process all channels.
Fields | Value |
---|---|
CHANNEL_RED |
1 |
CHANNEL_GRAY |
1 |
CHANNEL_CYAN |
1 |
CHANNEL_GREEN |
2 |
CHANNEL_MAGENTA |
2 |
CHANNEL_BLUE |
4 |
CHANNEL_YELLOW |
4 |
CHANNEL_ALPHA |
8 |
CHANNEL_OPACITY |
8 |
CHANNEL_MATTE |
8 |
CHANNEL_BLACK |
32 |
CHANNEL_INDEX |
32 |
CHANNEL_ALL |
134217727 |
HTTP Response
Fields | Type | Description |
---|---|---|
status |
Integer | Status code 200 indicates success, any other code indicates failure. |
link |
URL | Link to the image output which is usually stored on the pixlab.xyz storage server unless you set your own S3 keys (refer to your dashboard ↗ on how to do that). |
id |
String | Unique image ID. |
error |
String | Error message if status != 200. |
The API returns application/json
if the optional blob parameter is not set.
This endpoint returns a JSON Object after each call only if the optional blob parameter is omitted. Otherwise, the raw image binary is returned. The JSON response contains the following fields:
Code Samples
# Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
// Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
# Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
# Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
Similar API Endpoints
shade, negate, separate, sketch, normalize, oilpaint, polaroid, posterize, segment, quantize, raise, grayscale