Golang Project Structure

Tutorials, tips and tricks for writing and structuring code in Go (with some additional content for other programming languages)

art

Tag

How to Pixelate Images in Go

When an image is pixelated, it has a visual effect applied to reduce its level of detail through the use of many same-sized blocks, each painted with a single colour. Each of those blocks can be thought of as a large pixel (since a pixel is the smallest unit that can contain a colour in […]

Ways to Work Out the Average Colour of an Image

It’s reasonable to look at a picture and to wonder how it might look if it were distilled down into a single colour, which somehow still encapsulates a sense of the original. In this post, we will look at various methods that can be used to calculate the average colour of an image in Go, […]

256 Shades of Grey: Converting Colour Images to Greyscale

A beautiful rainbow in a rural landscape.

In this post, I am going to show you how to transform a full-colour image into one made up entirely of different shades of grey. The sort of image that we will create is called greyscale, because every colour that makes up the image is stored as a position on a predetermined scale of greys […]