ForHosting KIT · Images

Add image watermark

This image watermark position calculator determines exactly where a watermark will sit before any pixels are changed.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Provide the base image dimensions, the watermark image dimensions, a scale multiplier, and one of nine familiar anchor positions. The result gives the watermark’s left, top, right, and bottom coordinates together with its placed width and height. Optional proportional scale-down safely fits an oversized watermark within the base image while preserving its aspect ratio.

Describe both images in one coordinate system

Start with the width and height of the base image, then enter the watermark’s natural width and height. Pixels are the usual unit, but the calculation works with any consistent positive unit because it only compares and multiplies dimensions. A base image of 1200 by 800 and a watermark of 300 by 120 therefore describe two rectangles in the same coordinate system. The scale multiplier is applied uniformly to both watermark dimensions, preserving its aspect ratio. A scale of 0.5 makes each dimension half as large, while a scale of 2 doubles both. The calculator rejects zero, negative, missing, nonnumeric, or non-finite dimensions because those values cannot define a usable rectangle. It does not inspect or alter image files, estimate visible artwork inside transparent padding, or account for rotation. Use the actual canvas dimensions of each image. The returned width and height describe the complete placed watermark canvas, including any transparent pixels that belong to that source image.

Choose an anchor and understand the bounding box

The position chooses one of nine anchors: the four corners, the midpoint of each edge, or the exact center. Placement uses a top-left origin, which is standard for raster image coordinates: x increases toward the right and y increases toward the bottom. A top-left watermark begins at x zero and y zero. A bottom-right watermark ends at the base width and base height. Centered variants divide the remaining horizontal or vertical space equally, so their coordinates may contain decimals when the leftover distance is odd or fractional. The response reports x and y for the watermark’s top-left corner, width and height for its placed size, and right and bottom for the opposite edges. Together these values form the bounding box needed by many image libraries and rendering pipelines. No margin or padding is implied. If a design needs a gap from an edge, subtract or add that gap after calculation, or enlarge the conceptual watermark rectangle before positioning it.

Handle oversized watermarks deliberately

Scale is evaluated before placement. If the scaled watermark is wider or taller than the base image, the default behavior is an input error rather than a clipped or surprising result. This makes accidental use of the wrong dimensions visible early in an automated workflow. Set scale_down to true when fitting is the intended behavior. The calculator then selects the smaller of the available width ratio and height ratio, applies that additional reduction uniformly, and guarantees that both placed dimensions fit. It never enlarges a watermark under this option; the adjustment occurs only when the requested placement is oversized. The response includes the final applied scale and a scaled_down flag, so downstream code can record whether the requested size was changed. This is useful when preparing overlays for several image sizes: one placement rule can handle landscape, portrait, and thumbnail bases while preserving the watermark’s proportions. The calculation is deterministic, performs no upload, makes no network request, and costs $0.002 per API request when automated.

Prepare an overlay command

Calculate exact coordinates and placed dimensions before passing a logo and base image to an image-processing library.

Validate responsive watermark rules

Test the same scale and anchor against desktop, mobile, portrait, and thumbnail image dimensions without modifying files.

Prevent accidental clipping

Reject an oversized watermark or fit it proportionally before a production rendering pipeline applies the overlay.

Does this capability modify an image?

No. It calculates placement geometry only and returns a bounding box for another renderer or image library to use.

Where is the coordinate origin?

The origin is the top-left corner of the base image. The x coordinate increases rightward and y increases downward.

Does scaling preserve the watermark aspect ratio?

Yes. One uniform scale multiplier is applied to both dimensions, including any additional proportional fit when scale_down is enabled.

What happens when the watermark is too large?

The request fails by default. Set scale_down to true to reduce it proportionally until both dimensions fit within the base image.

Are margins included in the position?

No. Anchors touch the relevant edge or center the rectangle exactly. Apply any desired inset to the returned coordinates separately.

What does an API request cost?

The API price is $0.002 per request. The same deterministic calculation can run free in the browser.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/image/watermark-image

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/image/watermark-image \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base_width":1200,"base_height":800,"watermark_width":300,"watermark_height":120}'
{
  "base_width": 1200,
  "base_height": 800,
  "watermark_width": 300,
  "watermark_height": 120
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "image.watermark_image",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb15
max_megapixels12
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →