* Simple implementation of lanczos scaling
* Simple implementation of lanczos scaling
* Refactor lanczos into separate header
This commit moves the algorithm
into its own header. It also provides
templated interface now, utilizing
a little bit of decltype and declval
to resolve types for lambdas and stuff
* Zero pixel at start of lanczos_at
This commit fixes a possible bug and
fixes some style incosistencies
* Improve documentation for Lanczos
This commit adds documentation which
describes when to use the algorithm,
a brief description of how it is
supposed to work, and some caution
on the quality of the output
* Address style issues and fix warnings
This commit fixes a style issue realted
to namespace declaration and
fixes a warning in added zeroing of
a pixel at start of lanczos
* text-realign function arguments
* fix formatting issues
* Implement handful of sanity tests
This commit introduces a couple of
sanity tests such as black image
scaling to black image, and lanczos
response being 0 at x = 0
* bracket on newline for for loops
* add lanczos scaling to tests
* more precision in lanczos calculation
This commit migrates integral values
to double precision and uses PI
provided by boost.Math. These changes
solve downscaled image being darker
* Simple implementation of lanczos scaling
* Refactor lanczos into separate header
This commit moves the algorithm
into its own header. It also provides
templated interface now, utilizing
a little bit of decltype and declval
to resolve types for lambdas and stuff
* Zero pixel at start of lanczos_at
This commit fixes a possible bug and
fixes some style incosistencies
* Improve documentation for Lanczos
This commit adds documentation which
describes when to use the algorithm,
a brief description of how it is
supposed to work, and some caution
on the quality of the output
* Address style issues and fix warnings
This commit fixes a style issue realted
to namespace declaration and
fixes a warning in added zeroing of
a pixel at start of lanczos
* text-realign function arguments
* fix formatting issues
* Implement handful of sanity tests
This commit introduces a couple of
sanity tests such as black image
scaling to black image, and lanczos
response being 0 at x = 0
* bracket on newline for for loops
* add lanczos scaling to tests
* more precision in lanczos calculation
This commit migrates integral values
to double precision and uses PI
provided by boost.Math. These changes
solve downscaled image being darker
* Add Jamfile for ip test directory
Add Jamfile for image_processing
test directory and build-project
from outer test directory
* Add IP test directory to ci build
This commit adds a line at the end
of .ci/build-and-test.sh to include
image processing tests in CI builds
* Remove redundant lines from Jamfile
Simplify Jamfile at
test/image_processing
* Rewrite range condition
x > -a && x < a exchange with
-a < x && x < a in lanczos
* Add newline at the end of files
* Add math and lexical_cast to get-boost
As math and lexical_cast are used
in lanczos scaling, both were added
to get-boost
* Revert "Add newline at the end of files"
Since Boost.Math.Constants is
overengineered for use case by
requiring Boost.lexical_cast or
a global define, it is removed
This reverts commit 0743ab072ff3455421853697f7f46aee7d22382c.
* Define pi and use in lanczos
Value of pi is moved out into detail
and used by lanczos
* Move image_processing to test/core
* formatting fixes
* Adjust CMakeLists for moved IP tests
This commit removes image_processing as
subdirectory from test/ and adds to
test/core's CMakeLists
* Remove unused from get-boost
Since lanczos scaling no longer uses
boost.math.constants, lexical_cast
has been removed as well
* Downgrade math to transitive dep
This is a stray change left from
my incorrect resetting of the HEAD
on lanczos branch
* Remove unnecessary includes
io includes are not used in lanczos
scaling test, and they break build
* Fix ambiguous overload issue for min
Since width() and height() now return
std::ptrdiff_t, call to std::min needs
a cast. There was also shadowing of
pi declared in detail/math.hpp,
which is also fixed
* Apply mloskot's patch
The patch provided by Mateusz changes
all usages of long int into ptrdiff_t,
which is returned by width() and
height() functions of image_view
* Apply .editorconfig rules
This commit is a simple reformat of
affected files
* Use aliases x_coord_t and y_coord_t
The change converges integer handling
in arguments, using view' type aliases.
View arguments have to come first to
avoid non-deduced context problem.
Also replaced long int with ptrdiff_t
in lanczos, in numeric.hpp file
* Apply alias usage for rest of the code
Some places with ptrdiff_t were
left out from previous commit, so they
are changed in this one. Plus a fix for
max call being ambiguous.
* Replace all literals with casted vars
This commit takes extreme stance of
never using an integer literal due to
problems in ambiguity of deduction of
min and max functions
* Fix unenclosed foreach
During rebase of gsoc2019 onto develop,
I didn't enclose first foreach with
matching endforeach, hence tests failed
Apparently, for some not entirely clear reasons, possibly historical
use of `.vcproj`, LibRaw uses (not defines!) `WIN32` macro, instead of
C standard compliant `_WIN32` common to majority of compilers on Windows.
This patch is required if GIL IO is used with Boost.Build or custom
Makefile, without this custom `WIN32` hand-rolled in build configuration.
Hopefully, LibRaw may accept some clean up for this in near future:
https://github.com/LibRaw/LibRaw/pull/206
Although GCC 4.8 is labelled as C++11 compatible, the reasons are:
* GCC 4.8 is buggy enough to prevent reasonable use of Boost.MP11
* GCC 4.8 is dying
Closes#282
C++11 / 20.11.2 Header <type_traits> synopsis
1 The behavior of a program that adds specializations for any
of the class templates defined in this subclause is undefined
unless otherwise specified.
The specializations are not used anywhere, so they are safe to remove
without providing a replacement.
Fixes#283
Use type traits and features of C++11, then use Boost.MP11.
Remove unused and unnecessary metafunctions in `detail` namespace.
Remove explicit access to ::type as no longer necessary with MP11.
Clean up and reformat code according to the current guidelines.
Legacy tests have been updated where necessary to accommodate
switch to MP11.
Replace std::is_integral with gil::detail::is_channel_integral
Replacing boost::is_integral with std::is_integral is C++ UB:
C++11 / 20.11.2 Header <type_traits> synopsis
1 The behavior of a program that adds specializations for any
of the class templates defined in this subclause is undefined
unless otherwise specified.
Implements also proposal in #93Closes#229
Replace all scattered around forward declarations of
`dynamic_{x,y,xy}_step_type` with this common header,
where the templates are also documented.
Refine documentation of `transposed_type` - this is kept
in locator.hpp as it is not just related to the dynamic step.
when building tests with both, Boost.Build and CMake.
Disable concepts check for tests where range (e.g. std::array)
used as image pixel - not fully specialised as acceptable pixel type.
Ignore warnings from boost/concept_check.hpp
Rationalise uses of GCC and clang diagnostic push/pop,
with adding constraint for GCC 4.6+ as minimum version
where the pragma was introduced.
Closes#228
Remove unused #include-s and leave io/test/paths.hpp as sole
place of #include <boost/filesystem.hpp> for IO tests.
Silence annoying -Wconversion or -Wshorten-64-to-32 warning
from Boost.SmartPtr via Boost.Filesystem:
conversion to 'std::atomic<int>::__integral_type {aka int}'
from 'long int' may alter its value
Those are places boost::is_same can be replaced in non-intrusive way.
Remaining are types derived from boost::is_same, where the replacing
would affect all their uses - effectively switching from boost::true_/false_ types
to std::true_type and std::false_type.
Such change needs to come along with Boost.MPL to MP11 migration.
Replace boost::disable_if with std::enable_if and negated condition.
Update mpl::and_ expressions to yield value convertible to bool, instead of type.
Format std::enable_if expressions and nearby code they are nested in.
Replace complex template-based leading return type of functions
with auto and trailing return type for greater readability.
Replace some Boost type traits with <type_traits> features.
Replace 0 with nullptr where modernize-use-nullptr missed (updates #180).
Notice, boost::lazy_enable_if in extension/toolbox has not been replaced,
but it seems it could have been - need verification with number of compilers.
The constexpr belongs to the declaration specifiers (like static) and
not just the type specifiers (like cv-qualifiers), so it binds to
the declaration (like static), not the type (like const).
Refines #211
Replaced BOOST_STATIC_ASSERT with C++11 binary static_assert,
with empty message.
In future, this should make it possible to automatically refactor
into C++17 unary static_assert using clang-tidy and
its modernize-unary-static-assert check.
Closes#106
Replace boost::bind with std::bind from C++11.
Move template parameter comments to Doxygen \tparam-s,
so they are captured as proper documentation.
Tidy up code formatting.
Replace Boost.MPL boolean constants with C++11 equivalents.
Replace `throw()` with `noexcept`.
Replace empty constructor body with `default`.
Rename private class members to avoid leading underscore
(too easy to confuse as reserved identifier).
Tidy up with compact formatting.
Run clang-tidy 7.0 with `-checks='-*,modernize-use-using' -fix` against
single TU with `#include <boost/gil/extension/toolbox/*.hpp>`.
Manually refactor numerous typedef-s
- where missed by modernize-use-using check, not uncommon
- in code snippets in comments
Outcome is that searching for lower-case whole word typedef
in all the extension/toolbox/*.hpp should return no matches.
Run clang-tidy 7.0 with `-checks='-*,modernize-use-using' -fix` against
single TU with `#include <boost/gil/extension/io/*.hpp>`.
Manually refactor numerous typedef-s
- where missed by modernize-use-using check, not uncommon
- in code snippets in comments
Outcome is that searching for lower-case whole word typedef
in all the extension/io/*.hpp should return no matches.
Run clang-tidy 7.0 with `-checks='-*,modernize-use-using' -fix`
against single TU with `#include <boost/gil/io/*.hpp>`.
Manually refactor numerous typedef-s
- where missed by modernize-use-using check, not uncommon
- in code snippets in comments
Outcome is that searching for lower-case whole word typedef
in all io/*.hpp should return no matches.
Run clang-tidy 7.0 with `-checks='-*,modernize-use-using' -fix` against
single TU with `#include <boost/gil/extension/numeric/*.hpp>`.
Manually refactor numerous typedef-s
- where missed by modernize-use-using check, not uncommon
- in code snippets in comments
Outcome is that searching for lower-case whole word typedef
in all the extension/numeric/*.hpp should return no matches,