mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Issue #213: fix crash in ResizePngImage(), due to small scaling factor
This commit is contained in:
@ -3064,8 +3064,8 @@ begin
|
||||
else
|
||||
new_colortype := COLOR_RGB;
|
||||
bTmp := TPNGImage.CreateBlank(new_colortype, 8, NewWidth, NewHeight);
|
||||
xscale := bTmp.Width / (aPng.Width-0.35); // Modified: (was -1) substract minimal value before AlphaScanline crashes
|
||||
yscale := bTmp.Height / (aPng.Height-0.35);
|
||||
xscale := bTmp.Width / (aPng.Width-1);
|
||||
yscale := bTmp.Height / (aPng.Height-1);
|
||||
for to_y:=0 to bTmp.Height-1 do begin
|
||||
sfrom_y := to_y / yscale;
|
||||
ifrom_y := Trunc(sfrom_y);
|
||||
|
Reference in New Issue
Block a user