如何使用arduino提取网页中的图片并显示在自己的网页上

发布网友

我来回答

1个回答

热心网友

使用arino提取网页中的图片并显示在自己的网页上的方法:
1、设置screen.image(image, xPos, yPos);的参数:
image : a named instance of PImage.
xPos : int, location on the x-axis to start drawing
yPos : int, location on the y-axis to start drawing
2、举例说明:
PImage logo;

void setup() {
// initialize the screen
EsploraTFT.begin();
// initialize the SD card
SD.begin(SD_CS);
// set the background the black
EsploraTFT.background(0, 0, 0);

// load the image into the named instance of PImage
logo = EsploraTFT.loadImage("arino.bmp");

// if it is a valid image file, turn the Esplora's LED green
if (logo.isValid()) {
Esplora.writeGreen(255);
}
else{
// if it is not valid, turn the LED red
Esplora.writeRed(255);
}

// draw the image on the screen starting at the top left corner
EsploraTFT.image(logo, 0, 0);

}

void loop() {
//循环处理另一个网页上的图片,存放到本网页的固定位置
}

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com