Changeset 480 for trunk/LocalPlayer
- Timestamp:
- Dec 6, 2023, 11:05:10 PM (12 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/MessgEx.pas
r473 r480 264 264 else 265 265 share := share * yR; 266 Screwed[xDst + dx, yDst + dy, 0] := Screwed[xDst + dx, yDst + dy, 0] 267 + share * SrcPtr.Pixel^.B; 268 Screwed[xDst + dx, yDst + dy, 1] := Screwed[xDst + dx, yDst + dy, 1] 269 + share * SrcPtr.Pixel^.G; 270 Screwed[xDst + dx, yDst + dy, 2] := Screwed[xDst + dx, yDst + dy, 2] 271 + share * SrcPtr.Pixel^.R; 272 Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy, 273 3] + share; 266 if (xDst + dx < ScaleToNative(Width)) and 267 (yDst + dy < ScaleToNative(Height)) then begin 268 Screwed[xDst + dx, yDst + dy, 0] := Screwed[xDst + dx, yDst + dy, 0] 269 + share * SrcPtr.Pixel^.B; 270 Screwed[xDst + dx, yDst + dy, 1] := Screwed[xDst + dx, yDst + dy, 1] 271 + share * SrcPtr.Pixel^.G; 272 Screwed[xDst + dx, yDst + dy, 2] := Screwed[xDst + dx, yDst + dy, 2] 273 + share * SrcPtr.Pixel^.R; 274 Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy, 275 3] + share; 276 end; 274 277 end; 275 278 SrcPtr.NextPixel; -
trunk/LocalPlayer/Term.pas
r475 r480 719 719 TBuffer = array [0 .. 99999, 0 .. 2] of Integer; 720 720 var 721 Sum, Cnt, dx, dy, nx, ny, ix, iy, ir, X, Y, C, ch: Integer; 721 Sum: Int64; 722 Cnt, dx, dy, nx, ny, ix, iy, ir, X, Y, C, ch: Integer; 722 723 xdivider, ydivider: Integer; 723 724 Resampled: ^TBuffer; 724 725 PixelPtr: TPixelPointer; 726 V: Integer; 725 727 begin 726 728 nx := BigImp.Width div xSizeBig * xSizeSmall; … … 784 786 ((dx <= 0) or (ScaleFromNative(X) mod xSizeSmall < xSizeSmall - 1)) then 785 787 begin 786 Inc(Sum, Resampled[ScaleFromNative(X) + dx + nx * (ScaleFromNative(Y) + dy), ch]); 788 V := Resampled[ScaleFromNative(X) + dx + nx * (ScaleFromNative(Y) + dy), ch]; 789 Inc(Sum, V); 787 790 Inc(Cnt); 788 791 end; 789 Sum := ((Cnt * Sharpen + 800) * Resampled[ScaleFromNative(X) + nx * ScaleFromNative(Y), ch] - Sum * 790 Sharpen) div (800 * xSizeBig * (ySizeBig - 2 * Cut)); 792 V := Resampled[ScaleFromNative(X) + nx * ScaleFromNative(Y), ch]; 793 Sum := ((Cnt * Sharpen + 800) * V - Sum * Sharpen) 794 div (800 * xSizeBig * (ySizeBig - 2 * Cut)); 795 Sum := Round(Sum / ScaleToNative(ScaleToNative(1))); 791 796 if Sum < 0 then Sum := 0; 792 797 if Sum > 255 then Sum := 255;
Note:
See TracChangeset
for help on using the changeset viewer.