浏览代码

with traces

philippe44 2 年之前
父节点
当前提交
813bafb036
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11 1
      components/display/core/gds_image.c

+ 11 - 1
components/display/core/gds_image.c

@@ -424,8 +424,18 @@ bool GDS_DrawJPEG(struct GDS_Device* Device, uint8_t *Source, int x, int y, int
 		Context.Pixels = 0;
 					
 		// do decompress & draw
+ESP_LOGW(TAG,"Context before p:%d, w:%d, h:%d, min(%d,%d), ofs(%d,%d)", 
+	Context.Pixels,
+	Context.Width, Context.Height,
+	Context.XMin, Context.YMin,
+	Context.XOfs, Context.YOfs);		
 		Res = jd_decomp(&Decoder, OutHandlerDirect, N);
-		if (Res == JDR_OK && Context.Pixels != (Context.Width + 1) * (Context.Height + 1)) {
+ESP_LOGW(TAG,"Context after p:%d, w:%d, h:%d, min(%d,%d), ofs(%d,%d)", 
+	Context.Pixels,
+	Context.Width, Context.Height,
+	Context.XMin, Context.YMin,
+	Context.XOfs, Context.YOfs);
+		if (Res == JDR_OK && Context.Pixels == Context.Width * Context.Height) {
 			Device->Dirty = true;
 			Ret = true;
 		} else {