Create a free account and start processing
your images smarter.
Image Watermarking is the process of adding an additional, usually modest image to your graphics to prevent them from being circulated without your permission. Watermark alignment, shape, padding, and alpha transparency can all be controlled with Picsmize.
To add watermarks to your images, first submit the watermark(s) to your Picsmize account, then use just the unique IDs we issue them internally. API calls requesting picture watermarking will be significantly faster because watermark files will be securely stored on our machines.
Simply supply a watermark id within a watermark hash to advise the API to utilize an uploaded watermark
The API will place the watermark in the centre of a picture by default, regardless of its dimensions or opacity. Let's look at a very simple example:
You can change a watermark's default centre location by specifying one of the following gravity
values: top-left
, top
, top-right
, right
, bottom-right
, bottom
, bottom-left
, left
.
Set the gravity
value to top-right
to place a watermark in the top-right corner, for example:
You can additionally specify a watermark padding
option when using gravity
to position a watermark, which accepts a positive integer and indicates the distance between the watermark and image boundaries.
Assume you want your watermark to be in the bottom-right
corner, with a 30px padding:
You can use x
and y
attributes instead of gravity
if you know the exact coordinates where you want your watermark to go. The origin (zero point) lies in the top-left corner of the image.
To place a watermark exactly at x:200
, y:150
for example.
Watermark opacity provides a new opacity
parameter. For altering the opacity of the watermark, it takes a positive floating-point number in the range 0.01
- 1.00
.
Use the following parameters, for example, to apply a watermark with 0.75
opacity in the centre:
You can down sample your watermarks in two ways: within the watermark hash, by supplying width
and/or height
parameters, or by specifying a scale
parameter that takes a float in the range 0.01
- 1.00
. Watermarks should never be enlarged because this would degrade the image's quality. It's usually ideal to supply larger watermark images to the API and then resize/scale them down if necessary.
When the scale
argument is set to true, the API will down sample the watermark image by the scale value. Scale the watermark down to 75% of its original size and place it in the top-left
corner with 50px
padding.
The API will automatically calculate the watermarks dimensions in an auto mode, if the width and/or height parameters are provided. This suggests that the watermarks will always be down-sampled in accordance with its aspect ratio to stay within the set dimensions.
For example, to resize a watermark to a maximum width of 150px and insert it in the top-left corner with 50px padding, use the following formula:
Even if the dimensions of a specified watermark exceed the dimensions of the input image, the Picsmize Image API will not change its size by default. Take a look at the following example output from the API when the watermark size is larger than the image size:
By providing the fit
option to true
within the watermark
hash, you can tell the API to down sample larger watermarks to fit entirely within the image constraints. It's worth noting that, due to quality issues, the API will never upscale smaller watermarks to fit inside image constraints.
You can optionally specify gravity
, padding
, and opacity
values in addition to the fit parameter. For example, suppose you want to include a larger watermark with a 10px
padding, align it to the top, and make it semi-transparent by setting the opacity value to 0.8
: