This is a preview version of Cyotek's blog and may be missing functionality and/or unstable. Please visit for the current version of the blog.
If you encounter any problems using this preview site, please contact us with the details.

Posts tagged with 'algorithm'

Finding nearest colors using Euclidean distance

c# color algorithm euclidean 1 Comments Downloads

I've recently been updating our series on dithering to include ordered dithering. However, in order to fully demonstrate this I also updated the sample to include basic color quantizing with a fixed palette.

While color reduction and dithering are related, I didn't want to cover both topics in a single blog post, so here we are with a first post on finding the nearest color via Euclidean distance, and I'll follow up in another post on ordered dithering.

Read More

Even more algorithms for dithering images using C#

c# image algorithm dither 0 Comments

Although I should really be working on adding the dithering algorithms into Gif Animator, I thought it would be useful to expand the repertoire of algorithms available for use with it and the other projects I'm working on.

I decided to re-factor the class I created for the Burkes algorithm to make it suitable for adding other error diffusion filters with a minimal amount of code.

Read More

Dithering an image using the Burkes algorithm in C#

c# image algorithm dither 0 Comments Downloads

In my previous post, I described how to dither an image in C# using the Floyd‑Steinberg algorithm. Continuing this theme, this post will cover the Burkes algorithm.

I will be using the same demonstration application as from the previous post, so I won't go over how this works again.

Read More

Dithering an image using the Floyd‑Steinberg algorithm in C#

c# image algorithm dither 3 Comments Downloads

In my previous introductory post, I briefly described the concept of dithering an image. In this article, I will describe how to dither an image in C# using the Floyd–Steinberg algorithm.

For this series of articles, I'll be using the same demo application, the source of which can be found on GitHib. There's a few things about the demo I wish to cover before I get onto the actual topic of dithering.

Read More

An introduction to dithering images

image algorithm dither 0 Comments

When you reduce the number of colours in an image, it's often hard to get a 1:1 match, and so typically you can expect to see banding in an image - areas of unbroken solid colours where once multiple similar colours were present. Such banding can often ruin the look of the image, however by using dithering algorithms you can reduce such banding and greatly improve the appearance of the reduced image.

Here we see a nice view of the Tower of London (Image Credit: Vera Kratochvil). Lets say we wanted to reduce the number of colours in this image to 256 using the web safe colour palette.

Read More

Essential Algorithms - A Book Review

wiley rod stephens algorithm review book 4 Comments

This post is a review (or possibly some long winded rambling) of the book Essential Algorithms: A Practical Approach to Computer Algorithms by Rod Stephens and published by Wiley.

Disclaimer: I received a copy of this book (with a personal signed inscription too :)) directly from Rod with the condition that I review the book. This has not influenced my review except that I have tried to do a decent job rather than just picking a star and saying I liked it.

Read More