Skip to content

Text Overlay Parameters

The text overlay feature allows you to add text on top of images with full control over positioning, styling, and appearance.

txt

The text content to be overlaid on the image.

Type: string (URL encoded)
Default: None

txt_align

The text alignment can be specified using the txt_align parameter. The following options are supported:

  • top - Align to top of image
  • bottom - Align to bottom of image
  • middle - Align to vertical center
  • left - Align to left edge
  • right - Align to right edge
  • center - Align to horizontal center

You can combine the options to specify precise alignment, for example: txt_align=top,center

txt_size

The font size of the text in pixels.

Type: integer
Range: 8 - 300 pixels
Default: 20

txt_font

The font family to be used when rendering the text.

Type: string
Default: Arial
Common fonts: Arial, Helvetica, Times, Georgia, Verdana

txt_color

The color of the text. You can specify the color using color strings or color specifiers like hexadecimal, RGB, or HSL.

Type: string (color value)
Default: black

txt_line

The width of the outline border for the text in pixels.

Type: integer
Range: 0 - 10 pixels
Default: 0 (no outline)

txt_line_color

The color of the text outline. You can specify the color using color strings or color specifiers like hexadecimal, RGB, or HSL.

Type: string (color value)
Default: white

txt_pad

The padding around the text in pixels.

Type: integer
Range: 0 - 100 pixels
Default: 10

Usage

Basic Text Overlay

image.jpg?txt=Hello%20World&txt_size=48&txt_color=white
Add white "Hello World" text at 48px size.

Positioned Text

image.jpg?txt=Copyright%202024&txt_align=bottom,right&txt_size=16&txt_color=gray
Add copyright notice in bottom-right corner.

Text with Outline

image.jpg?txt=SALE&txt_size=72&txt_color=red&txt_line=3&txt_line_color=white
Add bold "SALE" text with white outline.

Custom Font

image.jpg?txt=Elegant%20Text&txt_font=Georgia&txt_size=36&txt_color=#333333
Use Georgia font for elegant text styling.

Use Cases

  • Watermarking: Add copyright or brand information
  • Promotional Banners: Overlay sale or discount text
  • Social Media: Add captions or hashtags
  • Product Labels: Add pricing or feature callouts
  • Event Graphics: Add dates, locations, or titles

Examples

Watermark

photo.jpg?txt=%C2%A9%202024%20Studio&txt_align=bottom,right&txt_size=14&txt_color=rgba(255,255,255,0.7)

Promotional Banner

product.jpg?txt=50%25%20OFF&txt_size=64&txt_color=red&txt_line=2&txt_line_color=white&txt_align=center

Social Media Caption

post.jpg?txt=New%20Collection&txt_font=Helvetica&txt_size=42&txt_color=white&txt_align=bottom,center&txt_pad=20

Event Information

event.jpg?txt=June%2015%2C%202024&txt_size=28&txt_color=black&txt_align=top,left&txt_pad=30