An implementation of ordered or error diffusion dithering
1 2 3 4 5 6 7 8 9 10 |
img |
path or URL to image |
res |
horizontal resolution of output image in pixels (default = 200) This is only used if scale = NULL (which is the default behavior). The reason for this is to try and prevent very large images being processed by accident (large images will be slow to dither) |
scale |
scaling percentage (default = NULL). If scale is not NULL, it overrides the value of res. Full size = 100, half size = 50 etc. |
target_palette |
A target palette of colours for the output image. One of
|
r |
spread in color space for target palette (default = 1/8). This default is set to look 'OK' by eye. It is probably the factor that will most significantly change the appearance of the dithering. Higher numbers will give 'broader' more dithering and lower numbers will give 'tighter' less dithering |
bayer_size |
bayer matrix size (square matrix of side length 2^bayer_size) (default = 3) |
dither |
dither type, one of
|
original |
return the original image (resized to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.