? Dithering ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Creep into the Halloween / Horror Programming Contest (Deadline Extended)

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) Warrior Warrior Intermediate Programmer I can make programs, but I still have trouble here and there. 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 chicken chicken OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Avatar Embargo I didn't change my avatar for 90 days Website Good Page Hidden Achievements erm can you dither with multiple colors, to make an ultragradient? 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS what. chicken chicken OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Avatar Embargo I didn't change my avatar for 90 days Website Good Page Hidden Achievements 16-bitify the gradient, then dither the gradient with the colors found on the 16-bitified one. 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS The dithering needs to be done before converting to 16 bit, since some information is lost when converting. chicken chicken OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Avatar Embargo I didn't change my avatar for 90 days Website Good Page Hidden Achievements yeah it's much better to do it with ze noise