Friday, November 6, 2026 · Asia/KarachiFree tools · No signup · Runs in your browser

Image Border

A 4 pixel border in #112233 around the 32 by 16 bars makes a 40 by 24 PNG. The corner pixel is that navy, 17, 34, 51. An 8 pixel white border makes 48 by 32. The picture in the middle is not scaled. The border is the same thickness on every side. There is no dashed style and no separate colour per side. Output is PNG. A transparent source is drawn as it decoded, then the border is painted around that rectangle. The source file is not overwritten.

New

The border is the same thickness on every side. The picture is not scaled. Output is PNG.

How to use

  1. Add 4 pixels of #112233.
  2. Expect 40 by 24 and a navy corner.
  3. Add 8 pixels of white and expect 48 by 32.

Formula / how it works

A 4 pixel border in #112233 around the 32 by 16 bars makes a 40 by 24 PNG. The corner pixel is that navy, 17, 34, 51. An 8 pixel white border makes 48 by 32. The picture in the middle is not scaled. The border is the same thickness on every side. There is no dashed style and no separate colour per side. Output is PNG. A transparent source is drawn as it decoded, then the border is painted around that rectangle. The source file is not overwritten.

Forty by twenty-four is 4 pixels around the bars. Forty-eight by thirty-two is 8 pixels around the same bars. The corner of the navy frame is 17, 34, 51. The white frame is white. The picture in the middle is the original grid, not a scaled copy. One thickness, one colour, PNG out. The file you picked is unchanged.

Four pixels of #112233 make 40 by 24, and the corner is 17, 34, 51. Eight pixels of white make 48 by 32. Add the thickness twice, once for each side, and the arithmetic matches the download. The bars in the middle are not scaled. There is one colour and one thickness. A dashed border is not offered. The PNG you picked is not overwritten. A larger photo grows by the same rule, not to a fixed canvas.

40 by 24 for four pixels of navy, corner 17, 34, 51. 48 by 32 for eight pixels of white. Thickness on every side, picture not scaled, one colour, PNG. The source bars stay where they were. A photo uses the same addition, not a fixed output size.

Recount 32 plus 4 plus 4, and 16 plus 4 plus 4, before you call 40 by 24 a surprise. Recount 8 the same way to get 48 by 32. The navy corner is the hex you typed. The white corner is white. The bars in the middle match the file you opened, at the original scale. One thickness, one colour, PNG, source untouched. A photograph follows the same addition.

The navy frame and the white frame are the two samples, 40 by 24 and 48 by 32. The corner matches the hex. The bars in the middle match the file at the original scale. Use the same arithmetic on a photograph: add the thickness twice to the width and twice to the height. One colour, one thickness, PNG out. The file you opened is not replaced by the download. Recount the thickness on a photograph the same way, twice on the width and twice on the height, before you call the canvas size wrong. Four pixels make 40 by 24. Eight pixels make 48 by 32. The middle bars are not scaled.

Round the result with rounded image.

Worked examples

Four pixel navy border

Inputs: ibr-f: bars-32x16.png | ibr-px: 4 | ibr-color: #112233

On this page, take bars-32x16.png, then 4, then #112233 and press Add border. The picture in the middle is not scaled.

Result: Border of 4 px in #112233: 40×24 PNG. 0.2 KB

Eight pixel white border

Inputs: ibr-f: bars-32x16.png | ibr-px: 8 | ibr-color: #ffffff

On this page, take bars-32x16.png, then 8, then #ffffff and press Add border. The picture in the middle is not scaled.

Result: Border of 8 px in #ffffff: 48×32 PNG. 0.2 KB

Use cases

  • Framing the bars without scaling them.
  • Checking the corner colour against the hex you typed.
  • Using the same thickness on every side.
  • Keeping a PNG.

Tips & limitations

  • 4 plus 32 plus 4 is 40.
  • 4 plus 16 plus 4 is 24.
  • The middle is not resized.
  • There is no per-side colour.

FAQ

Why is the 4 pixel result 40 by 24?

The bars are 32 by 16 and the border is added on every side.

What is the corner?

17, 34, 51, which is #112233.

Why is the white border 48 by 32?

Eight pixels on every side of 32 by 16.

Is the picture scaled?

No.

Can each side differ?

No.

Is the source overwritten?

No.

40 by 24 and 48 by 32 describe the bars plus those two borders. A larger photo grows by twice the thickness, not to a fixed size.