Browse Source

image: some cleanup in error diffusion code.

undefined
Sam Hocevar 10 years ago
parent
commit
86515f591c
1 changed files with 1 additions and 16 deletions
  1. +1
    -16
      src/image/stock.cpp

+ 1
- 16
src/image/stock.cpp View File

@@ -23,21 +23,6 @@ namespace lol

bool Image::Stock(char const *name)
{
/* Generate an error diffusion matrix. */
if (!strncmp(name, "ediff:", 6))
{
float const *ker = nullptr;
ivec2 size(0);


SetSize(size);
float *pixels = Lock<PixelFormat::Y_F32>();
memcpy(pixels, ker, size.x * size.y * sizeof(float));
Unlock(pixels);

return true;
}

/* Generate a completely random image. */
if (!strncmp(name, "random:", 7))
{
@@ -134,7 +119,7 @@ Array2D<float> Image::HalftoneKernel(ivec2 size)
return ret;
}

Array2D<float> EdiffKernel(EdiffAlgorithm algorithm)
Array2D<float> Image::EdiffKernel(EdiffAlgorithm algorithm)
{
Array2D<float> ret;



Loading…
Cancel
Save