The code snippet uses PHP + GD library to apply round corners on an image on-the-fly. It allows you to apply round corners of any size (radius) and color on a GIF, JPEG or PNG image. The script accepts a path or URL of an image and the resulting output can be sent to the browser directly in PNG or JPEG format.This script should work with PHP 4 or later with GD library version 2.0 or better. The script does not require an overlay image or other dependencies.