修复温差图保存后加载显示不一致的问题:保存时每隔10个像素采样,但加载时每个点被错误地扩展为10x10的矩形区域,导致图像显示与原始绘制不同。修改后仅使用2x2小矩形绘制采样点,更准确还原原始效果。
This commit is contained in:
@@ -4363,13 +4363,14 @@ namespace JoyD.Windows.CS
|
|||||||
if (pixelColor != Color.Transparent)
|
if (pixelColor != Color.Transparent)
|
||||||
{
|
{
|
||||||
// 绘制温差层图像对应的像素
|
// 绘制温差层图像对应的像素
|
||||||
// 注意:由于保存时是每隔10个像素采样,加载时需要填充这10x10的区域
|
// 修改:原代码每个采样点填充10x10区域导致图像显示不一致,改为只绘制实际采样的像素点
|
||||||
using (Graphics g = Graphics.FromImage(_tempDiffOverlayImage))
|
using (Graphics g = Graphics.FromImage(_tempDiffOverlayImage))
|
||||||
{
|
{
|
||||||
using (SolidBrush brush = new SolidBrush(pixelColor))
|
using (SolidBrush brush = new SolidBrush(pixelColor))
|
||||||
{
|
{
|
||||||
// 填充10x10的区域
|
// 只绘制单个点,而不是填充10x10区域,保持与原始绘制一致
|
||||||
g.FillRectangle(brush, x, y, 10, 10);
|
// 为了让点更清晰可见,使用2x2的小矩形
|
||||||
|
g.FillRectangle(brush, x, y, 2, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user