Is it possible to create a circular (or any other non-rectangular) image?

Viewed 8416

All disc-shaped images I see are actually within a rectangular box, and have the sides (black portions in the below image) made transparent.

disc-shaped image

Is it possible to have a circular canvas itself? Or were images always designed to be rectangular in shape?

If yes, how?

5 Answers

The issue is that your pixels wouldn't be identical. One of the key feature of an image is that all of the rows are the same size. This is because the array wouldn't have consistent dimensions if the rows were of different lengths. The only way to symmetrically divide a circle up in that manner would be by using diameters and circles inside of the circle. So the pixels in a circular image would look like this: Not geometrically perfect, homemade

The reason it would look like this is pretty simple. Consider the most effective way to get coordinates on a rectangle. This would of course be via tuples of (distance x,distance y), since for some arbitrary limit to the maximum x, and a separate limit to the y, the range of these coordinates is a rectangle. However, a range of coordinates that would fill a circle would consist of pairs of (distance x,degree y). To use (x,y) coordinates is possible, but it would be essentially making a square around the circle and finding points on that square where some are not allowed. When we partition the circle coordinates into pixels, they look like the above. Each of the sections here would be a pixel. However, there's a pretty huge problem: the pixels closest to the edge are bigger than those towards the center. In order to get high definition outer pixels, you'd need an unreasonable image quality in the inner pixels. That would be a huge waste of space. The reason images of circles look like the one you posted is because rectangles partition evenly and thereby don't have this problem. Hence, people generally prefer to just take the square surrounding the circle. It would be ridiculous to make a new image format just to exclude a fairly small number of pixels in the corners, so they just use an existing one. Hope this was the answer you were looking for.

Related