2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-24 05:52:13 +00:00

17 Commits

Author SHA1 Message Date
Marco Langer
3289fe0bc4 refactor: Unified operation names for pixel and channel operations (#655)
Renamed
- gil::pixel_multiply_t to gil::pixel_multiplies_t
- gil::pixel_divide_t to gil::pixel_divides_t

Closes #368
2022-04-30 23:53:41 +02:00
Pranam Lashkari
87a3157c4b numeric extension move into core part 4
moved numeric/pixel_numeric_operations.hpp into core
2022-02-18 14:25:59 +05:30
Cypre55
422ca82fe5 Removed two instaces of boost.mpl (#551)
Removed "#include <boost/mp11/mpl.hpp>"
at include/boost/gil/detail/mp11/hpp
and test/core/pixel/test_fixture.hpp
2021-01-28 22:42:30 +01:00
Mateusz Łoskot
470923be36 Fix default ctor of homogeneous_color_base for reference pixel elements (#542)
If `Element` is a reference, then Element v{} is ill-formed.

Refines #273 which aimed to correctly value-initialize channel and pixel value members
2021-01-22 18:01:54 +01:00
Mateusz Łoskot
446c1a2132 Fix overflow in RGB to CMYK32 conversion (#470)
Correct calculation to correctly map CMYK 0 to minimum
and 1 to maximum of input and output channel types.

If float-point division is necessary, use double instead of float
which may be too narrow for large operands. cmyk32_pixel_t is based on
uint32_t which multiplication by its maximum may yield result too
large to fit 32-bit float.

For example, (uint32_t(c) -  uint32_t(k)) * float(s) for
  c = 4294967295, k = 0, s = 1.0
results in 4294967300 value which does not fit uint32_t.

Fixes #406, but does not fix #479
2020-04-10 19:11:33 +02:00
Mateusz Łoskot
c8e77a5636 Test: do not value-initialize member of type of pixel reference 2020-04-06 22:31:12 +02:00
Mateusz Łoskot
f641190948 Replace BOOST_TEST with BOOST_TEST_EQ for streamable operands (#472)
Improve utilities sending channels, pixels and other GIL objects to
output stream for logging of test errors.

Fix missing namespace qualification in IO tests.

Comment TARGA test case with FIXME that was accidentally
uncommented in cc64bdd1a4
2020-04-01 01:54:12 +02:00
Mateusz Łoskot
dda885e5ff Replace Boost.Test with Boost.LightweightTest in test/ (#459)
Motivation is to:
- use on simpler and light test framework,
- eliminate dependency on libraries like Boost.MPL,
- achieve faster compilation times for CI builds (20% seems feasible)
- have test programs easy to run and debug
- avoid macros

Remove outdated FIXME-s for bugs that have been already fixed.
Fix off-by-one bug in test/core/test_fixture.hpp generators.
Minor corrections and tidying up.

Add missing test assertions to numeric extension tests.
Fixes #458
2020-03-21 22:53:09 +01:00
Mateusz Łoskot
d527916db0 Add test for pixel types with std::uninitialized_fill (#418)
Since `std::uninitialized_fill` performs a placement new on each
element in the range, it is important to ensure core and packed
pixel types behave correctly.

Split general purpose test fixtures into core/test_fixture.hpp.
2020-01-18 11:03:17 +01:00
Mateusz Łoskot
3915c3c030 Move operator<< for packed_pixel to unit_test.hpp 2020-01-13 22:56:47 +01:00
Mateusz Łoskot
cd40a87b83 Replace use of boost/core/lightweight_test.hpp with Boost.Test (#417)
Refactoring to unify use of the common framework across GIL tests.
Merge `unit_test_utility.hpp` into `unit_test.hpp` for convenience.
Add several test cases to `gil::point` tests.
2020-01-13 22:38:06 +01:00
Mateusz Łoskot
79ad37f75a Clean up BOOST_TEST_MODULE values for naming of test suites (#415)
Fix some Jamfile-s to not just `compile` some tests but also `run`, where applicable.
Remove redundant `project` definition from Jamfile-s.
2020-01-09 11:44:25 +01:00
Mateusz Łoskot
bd12f3cc7d [test] Split pixel_types fixture to integer and float pixel types (#365) 2019-08-06 08:16:11 +02:00
Mateusz Łoskot
dafcaa169e Extract GIL-specific Boost.Test utilities from test/unit_test.hpp (#338)
Add separate header `test/unit_test_utility.hpp` for printers and
other utilities for better integration of GIL types with Boost.Test.
2019-07-18 17:49:05 +02:00
Mateusz Łoskot
9ce3f08a36 Add first tests for convolve functions from Numeric extension (#335)
First stab at convolution tests includes cases with the identity kernel.
Move `pixel`-s streaming facility used by Boost.Test (required  by
`BOOST_TEST` macro) to the common header for re-use in other tests.
2019-07-14 21:43:32 +01:00
Mateusz Łoskot
baeac8ce87 Disable BOOST_GIL_USE_CONCEPT_CHECK when compiling tests with clang (#304)
Avoid Clang flooding with non-disableable warnings like:

   T does not declare any constructor to initialize its non-modifiable members

when compiling with concepts check enabled.

Bug 41759: `warn_no_constructor_for_refconst` can not be disabled (Boost.ConceptCheck)
https://bugs.llvm.org/show_bug.cgi?id=41759
2019-06-02 06:13:04 +02:00
Mateusz Łoskot
4ed7701b47 Move tests of extensions inside test/ directory (#302)
Split header tests accordingly i.e. test core headers as part of
core tests, numeric extension headers as part of numeric tests, etc.

It extends the convention of sub-directories already established in
`include/boost/gil` directory. It is sensible to follow it in other
areas of the source tree (i.e. `test/`, `doc/` and `benchmark/`).

Another important reason to move the tests is to enable removal of
the top-level `Jamfile` with all its definitions of test-specific
requirements.
The top-level `Jamfile` is not advised, especially if it specifies
build requirements like C++ language version.
Those affect non-tests builds e.g. documentation, causing failures
during generation of HTML documentation (leads to missing docs).
2019-05-28 18:58:22 +02:00