Please bookmark this page to avoid losing your image tool!

Image Circle Creator

(Free & Supports Bulk Upload)

Drag & drop your images here or

The result will appear here...
You can edit the below JavaScript code to customize the image tool.
function processImage(originalImg) {
  // Create a new canvas element to draw on.
  const canvas = document.createElement('canvas');
  const ctx = canvas.getContext('2d');

  // Determine the size for the circle. It will be a square canvas
  // with the side length equal to the smaller dimension of the original image.
  const size = Math.min(originalImg.width, originalImg.height);

  // Set the canvas dimensions.
  canvas.width = size;
  canvas.height = size;

  // Create a circular clipping path centered on the canvas.
  ctx.beginPath();
  ctx.arc(size / 2, size / 2, size / 2, 0, Math.PI * 2, true);
  ctx.closePath();
  ctx.clip();

  // Define the source rectangle (a square) to pull from the center of the original image.
  const sx = (originalImg.width - size) / 2;
  const sy = (originalImg.height - size) / 2;
  const sWidth = size;
  const sHeight = size;

  // Define the destination rectangle on the canvas. We'll fill the whole canvas.
  const dx = 0;
  const dy = 0;
  const dWidth = size;
  const dHeight = size;

  // Draw the central part of the original image onto the canvas.
  // The previously defined clipping path will ensure only the circular part is visible.
  ctx.drawImage(originalImg, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);

  // Return the canvas element which now contains the circular image.
  return canvas;
}

Free Image Tool Creator

Can't find the image tool you're looking for?
Create one based on your own needs now!

Description

The Image Circle Creator is a tool designed to convert standard images into circular images. By taking the center of the original image and cropping it into a circular shape, users can easily create profile pictures, icons, or decorative graphics suitable for web applications and social media. This tool is particularly useful for enhancing visual content by applying a modern and appealing circular design to images.

Leave a Reply

Your email address will not be published. Required fields are marked *