1.修复水印buf不足问题

This commit is contained in:
payton 2023-08-18 22:42:50 +08:00
parent a103cf9c09
commit 4daff525c5
2 changed files with 4 additions and 0 deletions

View File

@ -303,6 +303,7 @@ void UiDateImprint_InitBuff(void)
#if defined(_UI_STYLE_LVGL_) #if defined(_UI_STYLE_LVGL_)
pInfo->MemSize = UIDateImprint_GetStampMemSize_LVGL((const lv_font_t *)pFont, UiDateImprint_InitStrBuf()); pInfo->MemSize = UIDateImprint_GetStampMemSize_LVGL((const lv_font_t *)pFont, UiDateImprint_InitStrBuf());
pInfo->MemSize = pInfo->MemSize/4*5;
#else #else
GxGfx_SetTextStroke((const FONT *)pFont, FONTSTYLE_NORMAL, SCALE_1X); GxGfx_SetTextStroke((const FONT *)pFont, FONTSTYLE_NORMAL, SCALE_1X);
GxGfx_Text(0, 0, 0, UiDateImprint_InitStrBuf()); //not really draw GxGfx_Text(0, 0, 0, UiDateImprint_InitStrBuf()); //not really draw
@ -343,6 +344,7 @@ void UiDateImprint_InitBuff(void)
#if defined(_UI_STYLE_LVGL_) #if defined(_UI_STYLE_LVGL_)
pInfo->MemSize = UIDateImprint_GetStampMemSize_LVGL((const lv_font_t *)pFont, UiDateImprint_InitStrBuf()); pInfo->MemSize = UIDateImprint_GetStampMemSize_LVGL((const lv_font_t *)pFont, UiDateImprint_InitStrBuf());
pInfo->MemSize = pInfo->MemSize/4*5;
#else #else
GxGfx_SetTextStroke((const FONT *)pFont, FONTSTYLE_NORMAL, SCALE_1X); GxGfx_SetTextStroke((const FONT *)pFont, FONTSTYLE_NORMAL, SCALE_1X);
GxGfx_Text(0, 0, 0, UiDateImprint_InitStrBuf()); //not really draw GxGfx_Text(0, 0, 0, UiDateImprint_InitStrBuf()); //not really draw
@ -379,6 +381,7 @@ void UiDateImprint_InitBuff(void)
#if defined(_UI_STYLE_LVGL_) #if defined(_UI_STYLE_LVGL_)
pInfo->MemSize = UIDateImprint_GetStampMemSize_LVGL((const lv_font_t *)pFont, UiDateImprint_InitStrBuf()); pInfo->MemSize = UIDateImprint_GetStampMemSize_LVGL((const lv_font_t *)pFont, UiDateImprint_InitStrBuf());
pInfo->MemSize = pInfo->MemSize/4*5;
#else #else
GxGfx_SetTextStroke((const FONT *)pFont, FONTSTYLE_NORMAL, SCALE_1X); GxGfx_SetTextStroke((const FONT *)pFont, FONTSTYLE_NORMAL, SCALE_1X);
GxGfx_Text(0, 0, 0, UiDateImprint_InitStrBuf()); //not really draw GxGfx_Text(0, 0, 0, UiDateImprint_InitStrBuf()); //not really draw

View File

@ -432,6 +432,7 @@ void PhotoFastCapDateImprint_InitBuff(void)
// else{ // else{
// size = stamp_img.buff_size.output_buffer_size; // size = stamp_img.buff_size.output_buffer_size;
// } // }
stamp_text.buff_size.output_buffer_size = stamp_text.buff_size.output_buffer_size/4*5;
size = stamp_text.buff_size.output_buffer_size; size = stamp_text.buff_size.output_buffer_size;
ret = hd_common_mem_alloc("stamp_pri", &pa, (void **)&va, size, ddr_id); ret = hd_common_mem_alloc("stamp_pri", &pa, (void **)&va, size, ddr_id);