fix 5.83bc imagesize

This commit is contained in:
hnwangkg-ezio 2019-12-10 17:27:46 +08:00
commit 272e467da0
2 changed files with 5 additions and 5 deletions

View file

@ -45,17 +45,17 @@ int EPD_5in83bc_test(void)
//Create a new image cache named IMAGE_BW and fill it with white
UBYTE *BlackImage, *RYImage;
UWORD Imagesize = ((EPD_5IN83BC_WIDTH % 8 == 0)? (EPD_5IN83BC_WIDTH / 8 ): (EPD_5IN83BC_WIDTH / 8 + 1)) * EPD_5IN83BC_HEIGHT;
if((BlackImage = (UBYTE *)malloc(Imagesize / 2)) == NULL) {
if((BlackImage = (UBYTE *)malloc(Imagesize)) == NULL) {
printf("Failed to apply for black memory...\r\n");
return -1;
}
if((RYImage = (UBYTE *)malloc(Imagesize / 2)) == NULL) {
if((RYImage = (UBYTE *)malloc(Imagesize)) == NULL) {
printf("Failed to apply for red memory...\r\n");
return -1;
}
printf("NewImage:BlackImage and RYImage\r\n");
Paint_NewImage(BlackImage, EPD_5IN83BC_WIDTH, EPD_5IN83BC_HEIGHT / 2, 0, WHITE);
Paint_NewImage(RYImage, EPD_5IN83BC_WIDTH, EPD_5IN83BC_HEIGHT / 2, 0, WHITE);
Paint_NewImage(BlackImage, EPD_5IN83BC_WIDTH, EPD_5IN83BC_HEIGHT, 0, WHITE);
Paint_NewImage(RYImage, EPD_5IN83BC_WIDTH, EPD_5IN83BC_HEIGHT, 0, WHITE);
//Select Image
Paint_SelectImage(BlackImage);

View file

@ -3,4 +3,4 @@
2019-10-8: Add new programs for the 7.5inch V2 e-Paper and 7.5inch B V2 e-Paper programs.
2019-10-11: Add new feature 2.7inch e-Paper 4 grayscale.
2019-11-12: Adding a new feature 4.2inch e-Paper partial refresh display, partial refresh display is not good, not added in some routines.
2019-11-13: Add a new feature 4.2inch e-Paper 4 grayscale.
2019-11-13: Add a new feature 4.2inch e-Paper 4 grayscale.