ColorizeNumber - Bodrum Papatya is a project to visualize numeric data.
ColorizeNumber - Bodrum Papatya helps you to visualize numeric data.
Release: Latest release
.NET CLI:
dotnet add package ColorizeNumber
TestColorizeNumber()
{
// Data - 25 charachters
string dataText = "1122334455667788990012345";
// Data to Frame (25 byte length)
Frame frame = CreateFrameFromData(dataText, 5, 5, colorizeFunction: ColorizeFunc);
// Frame to Bitmap (5x5)
Bitmap bitmap = CreateBitmap(frame);
// Saving bitmap.
bitmap.Save("./ColorizeNumberTest.bmp", ImageFormat.Bmp);
// EasySaver.BitmapFile is providing saving methods for bitmap files.
// It automatically saves bitmap with specified naming formats.
// https://github.com/meokullu/EasySaver/tree/master/EasySaver.BitmapFile
// https://www.nuget.org/packages/EasySaver.BitmapFile/
// Save(Bitmap bitmap)
// SaveToFolder(Bitmap bitmap)
}
CreateFrameRandomly(int width, int height);
CreateFrameRandomly(int width, int height, RGBColor[] colorList)
CreateFrameRandomly(int width, int height)
RGBColor MyColorizeFunc(byte number)
{
if (number < 5) // If number is 0, 1, 2, 3, 4 returns white color.
{
return new RGBColor(red: 255, green: 255, blue: 255);
}
else // If number is 5, 6, 7, 8, 9 returns black color.
{
return new RGBColor(red: 0, green: 0, blue: 0);
}
}
GetRandomColor();
GetRandomColor(RandomColorLimit limits)
Tip
To save reporting result easily, you can use EasySaver.BitmapFile.
dotnet add package EasySaver.BitmapFile
To check listed methods, example of output visit wiki page. ColorizeNumber Wiki
See Changelog
- Create an issue or check task list: Issues
This repository is licensed under the "MIT" license. See MIT license.
If you'd like to contribute, then contribute. contributing guide.
Twitter: Enes Okullu @enesokullu