if x < BMP.Width - 1 then
FastPixel(BMP, CArray, x + 1, y, ApplyError(FastPixel(BMP, CArray, x + 1, y), error, 7));
if y < BMP.Height - 1 then
begin
if x > 0 then
FastPixel(BMP, CArray, x - 1, y + 1, ApplyError(FastPixel(BMP, CArray, x - 1, y + 1), error, 3));
FastPixel(BMP, CArray, x, y + 1, ApplyError(FastPixel(BMP, CArray, x, y + 1), error, 5));
if x < BMP.Width - 1 then
FastPixel(BMP, CArray, x + 1, y + 1, ApplyError(FastPixel(BMP, CArray, x + 1, y + 1), error, 1));
end;