? Dithering ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Dithering

Pretend that (for some reason) you want to send this image to SmileBASIC: If you try to convert it directly to a format that works in SB, it ends up looking like this: That's because SB only uses 16 bits to store colors instead of 32. However, you can use dithering to make it look better: http://12Me21.github.io/dither This type of dithering works by calculating the difference between the 32 bit color and the 16 bit color, and spreading the error to surrounding pixels. For example, if one pixel is made slightly darker when converting to 16 bit, the surrounding pixels (the ones that have not been converted yet) will be made slightly lighter.
Author
12Me21
Updated
Rating
8 votes
Categories
Keywords
7 Comment(s) MochaProbably MochaProbably Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies This makes sense Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies Clever! I use Photoshop to convert my image into an 8 bit png, which automatically dithers it to make up for limited colors kenchic kenchic First Year My account is over 1 year old Website Second Year My account is over 2 years old Website Third Year My account is over 3 years old Website erm can you dither with multiple colors, to make an ultragradient? 12Me21 12Me21 Head Admin Second Year My account is over 2 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself what. kenchic kenchic First Year My account is over 1 year old Website Second Year My account is over 2 years old Website Third Year My account is over 3 years old Website 16-bitify the gradient, then dither the gradient with the colors found on the 16-bitified one. 12Me21 12Me21 Head Admin Second Year My account is over 2 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself The dithering needs to be done before converting to 16 bit, since some information is lost when converting. kenchic kenchic First Year My account is over 1 year old Website Second Year My account is over 2 years old Website Third Year My account is over 3 years old Website yeah it's much better to do it with ze noise