This program uses EasyX as the graphics library, so please configure EasyX before use!!!
- Please use Release to compile, otherwise the window may not be found.
You can also directly get the color value of the scattered RGB pixels (the original xy coordinates, 3:1 (after the scattering, the original), no need to multiply the coordinates by 3)
Now that you can get it directly, you can also edit the RGB pixels directly!(the original xy coordinates!!!)
#include "EasyRGB.h"
#include <conio.h>
int main()
{
initgraph(255,255);
for (int i = 0; i < 255; i++)
{
for (int j = 0; j < 255; j++)
{
putpixel(i, j, RGB(i, j, 0));
}
}
EasyRGB::DefaultImage2PixelRGB();
Sleep(5000);
EasyRGB::PixelRGB2DefaultImage();
_getch();
closegraph();
return 0;
}
Translator: Google Translate(Chinese to English)