Browse Source

Remove clamp

Former-commit-id: a40778b4016da2cac12d09185aaf98117332acc8
Former-commit-id: d165853bbbfaf1f33d1a653f3e0f63761bb17c71
Former-commit-id: 66e49046205dc7722b8351957608bf136f168436
pull/17/head
James Jackson-South 10 years ago
parent
commit
94201ea941
  1. 4
      src/ImageProcessor/Common/Helpers/PixelOperations.cs

4
src/ImageProcessor/Common/Helpers/PixelOperations.cs

@ -70,7 +70,7 @@ namespace ImageProcessor
byte[] ramp = new byte[256];
for (int x = 0; x < 256; ++x)
{
byte val = (byte)(255f * SrgbToLinear(x / 255f)).Clamp(0, 255);
byte val = (255f * SrgbToLinear(x / 255f)).ToByte();
ramp[x] = val;
}
@ -89,7 +89,7 @@ namespace ImageProcessor
byte[] ramp = new byte[256];
for (int x = 0; x < 256; ++x)
{
byte val = (byte)(255f * LinearToSrgb(x / 255f)).Clamp(0, 255);
byte val = (255f * LinearToSrgb(x / 255f)).ToByte();
ramp[x] = val;
}

Loading…
Cancel
Save