diff --git a/src/Makefile.am b/src/Makefile.am index 5b9fbe51..3f76fba5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -110,7 +110,7 @@ liblolcore_sources = \ sys/init.cpp sys/timer.cpp sys/file.cpp \ sys/thread.cpp sys/threadbase.h \ \ - image/image.cpp image/image-private.h image/stock.cpp image/pixels.cpp \ + image/image.cpp image/image-private.h image/kernel.cpp image/pixels.cpp \ image/crop.cpp \ image/codec/gdiplus-image.cpp image/codec/imlib2-image.cpp \ image/codec/sdl-image.cpp image/codec/ios-image.cpp \ diff --git a/src/image/stock.cpp b/src/image/kernel.cpp similarity index 95% rename from src/image/stock.cpp rename to src/image/kernel.cpp index 153a4b16..53afa1a6 100644 --- a/src/image/stock.cpp +++ b/src/image/kernel.cpp @@ -15,34 +15,12 @@ #include "core.h" /* - * Stock images and kernels + * Stock kernels */ namespace lol { -bool Image::Stock(char const *name) -{ - /* Generate a completely random image. */ - if (!strncmp(name, "random:", 7)) - { - ivec2 size(0); - - size.x = atoi(name + 7); - name = strchr(name + 7, 'x'); - if (name) - size.y = atoi(name + 1); - if (!size.y) - size.y = size.x; - if (size.x <= 0 || size.y <= 0) - return false; - - return RenderRandom(size); - } - - return false; -} - Array2D Image::BayerKernel(ivec2 size) { Array2D ret(size); diff --git a/src/lol/image/image.h b/src/lol/image/image.h index 5e43f6eb..abab29cc 100644 --- a/src/lol/image/image.h +++ b/src/lol/image/image.h @@ -100,7 +100,6 @@ public: vec2 delta = vec2(0.f, 0.f)); /* Rendering */ - bool Stock(char const *desc); bool RenderRandom(ivec2 size); /* Image processing */ @@ -112,6 +111,7 @@ public: Image YUVToRGB() const; Image RGBToYUV() const; + /* Dithering */ Image DitherRandom() const; Image DitherEdiff(Array2D const &kernel, ScanMode scan = ScanMode::Raster) const; diff --git a/src/lolcore.vcxproj b/src/lolcore.vcxproj index 2376f5d2..a700e767 100644 --- a/src/lolcore.vcxproj +++ b/src/lolcore.vcxproj @@ -159,6 +159,7 @@ + diff --git a/src/lolcore.vcxproj.filters b/src/lolcore.vcxproj.filters index f1607321..9d199931 100644 --- a/src/lolcore.vcxproj.filters +++ b/src/lolcore.vcxproj.filters @@ -102,6 +102,9 @@ image + + image + debug