Jaycar-Electronics / Digital-Photo-Frame

Use the Uno with ESP8266 Wifi to make a desktop imgur photo frame
2 stars 1 forks source link

Image rotation #1

Open Jaycar-Electronics opened 5 years ago

Jaycar-Electronics commented 5 years ago

At the moment the image does not render properly. it would be best to check the image width / height, and transmit the data packets in either a row-first or column-first order;

it might be possible to do via sending the params out of order:

ie: in espcode.ino ~line 270

Serial.print(F(">>>")); //start of data tag
send16(mcu_pixels);     // number of pixels in this block
if (landscape)
{
    send16(mcu_x);   // position x
    send16(mcu_y);   // position y
    send32(param_x); // width
    send32(param_y); // height
}
else
{
    send16(mcu_y);   // position x is now the old y.
    send16(mcu_x);   // position y is now the old x. (swivel.)
    send32(param_y); // the width is the height of the old picture.
    send32(param_x); // the height is the width of the old picture
}

however you might have to transpose the pImg data as well.