This commit is contained in:
topicchi
2024-09-24 16:54:39 +00:00
parent e3ca99e4db
commit c7a68c0205
332 changed files with 6098 additions and 4139 deletions

View File

@@ -106,7 +106,7 @@ void loop() {
frame.fillSprite(PAPER);
// Draw 8 bit grey-scale bitmap using Floyd-Steinberg dithering at x,y
// Draw 8-bit grey-scale bitmap using Floyd-Steinberg dithering at x,y
// /File name x y
//drawFSBmp("/TestCard.bmp", 0, 0); // 176 x 264 pixels

View File

@@ -27,14 +27,14 @@
SOFTWARE.
Note: drawFSBmp() is a simplified function and does not handle all possible
BMP file header variants. It works OK with 8 bit per pixel grey-scale images
BMP file header variants. It works OK with 8-bit per pixel grey-scale images
generated by MS Paint and IrfanView.
*/
// https://github.com/Bodmer/TFT_eSPI
//====================================================================================
// Draw an 8 bit grey-scale bitmap (*.BMP) on a Monochrome display using dithering
// Draw an 8-bit grey-scale bitmap (*.BMP) on a Monochrome display using dithering
//====================================================================================
// Uses RAM for buffers (3 * width + 4) ( 532 bytes for 176 pixels)
@@ -102,10 +102,10 @@ void drawFSBmp(const char *filename, int16_t x, int16_t y) {
uint16_t padding = (4 - (w & 3)) & 3; // Calculate the BMP line padding
// Create an zero an 8 bit pixel line buffer
// Create an zero an 8-bit pixel line buffer
uint8_t* lineBuffer = ( uint8_t*) calloc(w , sizeof(uint8_t));
// Create a 16 bit signed line buffer for the quantisation error
// Create a 16-bit signed line buffer for the quantisation error
// Diffusion spreads to x-1 and x+1 so w + 2 avoids a bounds check
int16_t* qerrBuffer = ( int16_t*) calloc((w + 2)<<1, sizeof(uint8_t));
@@ -174,7 +174,7 @@ void drawFSBmp(const char *filename, int16_t x, int16_t y) {
}
//====================================================================================
// Read a 16 bit value from the filing system
// Read a 16-bit value from the filing system
//====================================================================================
uint16_t read16(fs::File &f) {
uint16_t result;
@@ -184,7 +184,7 @@ uint16_t read16(fs::File &f) {
}
//====================================================================================
// Read a 32 bit value from the filing system
// Read a 32-bit value from the filing system
//====================================================================================
uint32_t read32(fs::File &f) {
uint32_t result;