基于脚本处理图像
colordata2d RGBA;
intdata2d Point,Point2,Point3;
intdata2d Pointt;
SetDim(Point, 400, 2);
SetDim(Point2, 400, 2);
SetDim(Point3, 3, 2);
SetDim(RGBA,1054,1054);
@@
for (i = 0 : 1 : 2, j = 0 : 1 : 400)
if (i == 0)
{
Point[i][j] = j;
Point2[i][j] = j;
}
else if (i == 1)
{
Point[i][j] = 100 * (1 + sin(j / 30));
Point2[i][j] = 100 * (1 + cos(j / 30));
}
else
{
}
@@
##Point[0][0] = 100;
##Point[1][0] = 100;
##Point[0][1] = 200;
##Point[1][1] = 50;
##Point[0][2] = 400;
##Point[1][2] = 100;
##Point[0][3] = 350;
##Point[1][3] = 400;
##Point[0][4] = 150;
##Point[1][4] = 300;
SetColor(RGBA, 255, 255, 255, 1);
##SetColor(RGBA, 128, 128, 128, 2)));
##SetPara(RGBA, 10, 0);
##SetPara(RGBA, 10, 1);
##DrawPattern(RGBA, checkboard);
SetBkColor(RGBA, 255, 0, 255);
SetPixelColor(RGBA, 128, 128, 128);
SetBk(RGBA);
Load(122.bmp, R, G, B, A);
DrawImage(RGBA, 10,10,R, G, B);
DrawImage(RGBA, 10, 532, R, G, B);
DrawImage(RGBA, 532, 10, R, G, B);
Perspective(R, 30, 50, 50, 1, 1, 0, 0, 0, 5, 5);
Perspective(G, 30, 50, 50, 1, 1, 0, 0, 0, 5, 5);
Perspective(B, 30, 50, 50, 1, 1, 0, 0, 0, 5, 5);
##Cut(R, 100, 300, 200, 400);
##Cut(G, 100, 300, 200, 400);
##Cut(B, 100, 300, 200, 400);
Resize(R, 400, 400);
Resize(G, 400, 400);
Resize(B, 400, 400);
DrawImage(RGBA, 532, 532, R, G, B);
SetLineWidth(RGBA, 4);
SetPara(RGBA, 50, 0);
SetPara(RGBA, 50, 1);
SetPixelColor(RGBA, 128, 50, 89);
DrawLines(RGBA, Point,polygon);
SetPixelColor(RGBA, 50, 150, 189);
DrawLines(RGBA, Point2, polygon);
SetPixelColor(RGBA, 128, 128, 128, 1);
SetLineWidth(RGBA, 2);
SetPixelColor(RGBA, 0, 0, 255);
DrawAxis(RGBA, 450, 300);
SetLineWidth(RGBA, 1);
SetPixelColor(RGBA, 255, 0, 0);
DrawSymbol(RGBA, 100, 100,4,4,cross);
DrawSymbol(RGBA, 200, 100, 4, 4, rectsolid);
DrawSymbol(RGBA, 300, 100, 4, 4, rect);
SetPixelColor(RGBA, 128, 128, 128);
DrawSymbol(RGBA, 200, 200, 70, 30, ecllipsesolid);
Point3[0][0] = 100;
Point3[1][0] = 100;
Point3[0][1] = 200;
Point3[1][1] = 50;
Point3[0][2] = 400;
Point3[1][2] = 100;
SetPixelColor(RGBA, 0, 255, 0);
DrawSymbols(RGBA, Point3, 10, 7, rect);
SetTxtColor(RGBA, 200, 120, 80);
SetTxtBkColor(RGBA, 255, 255, 255);
DrawTxt(RGBA, 文字测试1:, 40, 250,300, 楷体,正体,forward);
DrawTxt(RGBA, 文字测试2:, 40, 250, 300, 楷体, 正体, backward);
Save(label.bmp, RGBA, rgb4);
Delete(all);