Commit Graph

849 Commits

Author SHA1 Message Date
Mateusz Łoskot
4bd625ff31
Replace unsigned with signed for int as compile-time index 2018-09-28 23:30:35 +02:00
Mateusz Loskot
7293313207
Merge pull request #145 from mloskot/ml/includes-relative-to-boost-root-and-sorted
Refactor library includes to #include <boost/gil/...>
2018-09-28 21:19:17 +02:00
Mateusz Łoskot
32fec9f05b
Refactor library includes to #include <boost/gil/...>
Group include directives, sort within group:
* In headers of GIL core and extensions:
  1. boost/gil/extension/*
  2. boost/gil/*
  3. boost/*
  4. C++ standard library headers
* In programs:
  1. boost/gil/*
  2. boost/*
  3. C++ standard library headers
  4. "xxx.hpp" for local headers
Add basic guidelines to CONTRIBUTING.md.
Add/Remove #include <boost/config.hpp> or std headers un/necessary.
Rename gil_concept.hpp to concepts.hpp.
Remove gil_all.hpp - we already have all-in-one boost/gil.hpp.
Tidy up and unify copyright and license header.
Tidy up formatting and excessive whitespaces in some comments.
Remove Doxygen block with file description, author, date, etc.
Remove dead or commented pragmas and directives.
Trim trailing whitespaces.
2018-09-28 16:26:34 +02:00
Mateusz Loskot
fe0113e828
Merge pull request #144 from mloskot/ml/remove-gil-config-header
Remove gil_config.hpp as unnecessary
2018-09-27 20:12:56 +02:00
Mateusz Łoskot
c3bb2e1a94
Remove gil_config.hpp as unnecessary
Move BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS define setting and
documentation comment to channel.hpp where solely used.

Trim trailing whitespaces.
2018-09-27 15:38:40 +02:00
Mateusz Łoskot
4f74f6e365 Catch up with recent clean up in Numeric [ci skip]
The test.cpp was removed in ecc19de7c9
2018-09-25 10:56:59 +02:00
Mateusz Loskot
7f0c223ddc
Merge pull request #128 from mloskot/ml/trac-ticket-2979
Correct description of image_is_basic metafunction (Trac 2979)
2018-09-24 20:29:36 +02:00
Mateusz Loskot
8b7ed5e111
Merge pull request #143 from mloskot/ml/avoid-warnings-in-promote_integral
Add casts to avoid warnings due to implicit integral promotions
2018-09-24 14:57:44 +02:00
Mateusz Łoskot
609a2d3a49
Add casts to avoid warnings due to implicit integral promotions
The explicit casts help to avoid warnings when integer types
smaller than int are implicitly converted during arithmetic operations.
2018-09-24 11:11:01 +02:00
Mateusz Łoskot
afe0c2415b
Fix warning: comparing floating point with == is unsafe
Use >= trick where value is guaranteed to never be greater than comparator
but to avoid warning: comparing floating point with == is unsafe.
2018-09-24 10:42:31 +02:00
Mateusz Loskot
7a5bd6986e
Merge pull request #139 from mloskot/ml/trac-ticket-7092
Remove re-assignment of functor from for_each_pixel (Trac 7092)
2018-09-23 21:26:07 +02:00
Mateusz Loskot
dd862cefb9
Merge pull request #138 from mloskot/ml/fix-toolbox-get_num_bits-as-unsigned
Base get_num_bits metafunction for T on mpl::size_t instead of mpl::int_
2018-09-23 21:08:28 +02:00
Mateusz Loskot
11a84bf05c
Merge pull request #134 from mloskot/ml/fix-warning-float-equal
Fix warning: comparing floating point with == is unsafe
2018-09-23 21:07:23 +02:00
Mateusz Loskot
b6a9c9a938
Merge pull request #141 from mloskot/ml/example-jamfile-update [ci skip]
Add first batch of examples to Jamfile
2018-09-22 10:38:25 +02:00
Mateusz Łoskot
aac69ac846
Add first batch of examples to Jamfile
Update examples to catch up with recent changes and ensure they both
compile without errors (using GCC 5).
2018-09-21 23:02:49 +02:00
Mateusz Loskot
95fbc4b2d3
Merge pull request #140 from mloskot/ml/jamfiles-cleanup
Simplify and clean up Jamfiles
2018-09-21 21:44:00 +02:00
Mateusz Łoskot
f613cc4088
Remove re-assignment of functor from for_each_pixel (Trac 7092)
The assignment was superfluous in general case and incorrect in specific
case when the algorithm was given a lambda expression.
The copy assignment operator is defined as deleted for lambda
expressions.

Add minimal test for for_each_pixel algorithm to verify it compiles with
lambda expression.
2018-09-21 18:50:40 +02:00
Mateusz Łoskot
ecc19de7c9
Simplify and clean up Jamfiles
Rename Jamfile.v2 to Jamfile - BBV1 is dead.
Remove numeric/test/test.cpp as redundant.
2018-09-21 18:02:37 +02:00
Mateusz Loskot
4093bd5111
Merge pull request #137 from mloskot/ml/fix-buffer-shadow
Rename JPEG-s reader_backend::buffer member array to buffer_
2018-09-20 12:14:48 +02:00
Mateusz Łoskot
79f01a4d35 Fix warning: comparing floating point with == is unsafe
Trick compiler by using >= instead of ==,
where LHS color is guaranteed to never be greater than RHS color value.
2018-09-19 18:58:29 +02:00
Mateusz Łoskot
5d189679fb Base get_num_bits metafunction for T on mpl::size_t instead of mpl::int_
Previously used mpl::int_ assumes signed integer, while sizeof(T) is
unsigned and compiler issues warning.
2018-09-19 18:58:06 +02:00
Mateusz Łoskot
18d5ecb7a8 Rename JPEG-s reader_backend::buffer member array to buffer_
The previous name is too generic and prone to variable shadowing,
causing compilation warnings (eg. vector named buffer in JPEG-s
reader::read_rows method).
2018-09-19 18:53:52 +02:00
Mateusz Loskot
972343a014
Merge pull request #135 from mloskot/ml/fix-example-dynamic-image-post-boost-1.68
Update example/dynamic_image.cpp after IO reimplentation
2018-09-19 15:17:45 +02:00
Mateusz Łoskot
513cd9d512 Update example/dynamic_image.cpp after IO reimplentation
Reminder: Boost.GIL 2.2 released in Boost 1.67
has completely reimplemented I/O extensions.
There still may be examples that no longer compiler.
2018-09-19 11:42:28 +02:00
Mateusz Łoskot
275b12ccff
[travis] Force installation of Sphinx 1.7.9 due to bug in 1.8.0
Fixes #136
2018-09-19 11:38:52 +02:00
Mateusz Łoskot
18963c857c Fix CMake status message [ci skip] 2018-09-18 12:01:55 +02:00
Mateusz Łoskot
0dbca043a8 Unify git submodule update command [ci skip] 2018-09-16 22:06:34 +02:00
Mateusz Loskot
ea7e85e4b8
Merge pull request #133 from mloskot/ml/trac-ticket-2222
Update image_view to model Collection concept (Trac 2222)
2018-08-30 16:01:57 +02:00
Mateusz Łoskot
b1eaa7ea90 Update image_view to model Collection concept (Trac 2222)
* Applies patch from John Femiani submitted via Trac
  https://svn.boost.org/trac10/ticket/2222 description:
  It would be convenient if GIL views modeled ReversibleCollection concept.
  In fact they almost do already. Without modeling this concept, it is
  hard to use an image view with boost::range algorithms.
* Add related image_view concepts for Collection, ForwardCollection,
  ReversibleCollection.
* Add tests for the new concepts.
* Add run-time tests for the new image_view methods.
2018-08-29 22:10:18 +02:00
Mateusz Łoskot
4c9ba74769 Replace lightweight_test_traits.hpp with lightweight_test.hpp 2018-08-29 18:04:06 +02:00
Mateusz Łoskot
85dbc8c21f Switch image_view tests from Boost.Test to Boost.Core.LightweightTest 2018-08-29 17:55:46 +02:00
Mateusz Łoskot
46e29e396c Expose C++11 requirement [ci skip] 2018-08-29 16:21:06 +02:00
Mateusz Loskot
ee4d239513
Merge pull request #132 from mloskot/ml/fix-warning-unused-variable
Fix warning about assigned but unused variable num_elements
2018-08-27 09:12:06 +02:00
Mateusz Loskot
d814313bb6
Merge pull request #129 from mloskot/ml/trac-ticket-8896
Add missing template keyword prior to dependent name axis_iterator (Trac 8896)
2018-08-27 09:10:47 +02:00
Mateusz Łoskot
871b7b6897 Fix warning about assigned but unused variable num_elements 2018-08-25 22:54:29 +02:00
Mateusz Łoskot
61d55226f9 [CircleCI] Switch build GCC 8.1 to 8.2 2018-08-25 22:46:08 +02:00
Mateusz Łoskot
29f84f402c Add GCC flags extended with extra warnings [ci skip]
Currently, the extended flags are disabled by default.
The list of extra warnings taken from Trac ticket
https://svn.boost.org/trac10/ticket/4014
2018-08-25 10:07:22 +02:00
Mateusz Łoskot
fb272d6c86 Emphasize branch requirement and simplify description section [ci skip] 2018-08-24 09:57:16 +02:00
Mateusz Łoskot
0c9053f28d Format preparation steps for better readability [ci skip] 2018-08-24 09:55:55 +02:00
Mateusz Łoskot
4500543a74 Add missing template keyword prior to dependent name axis_iterator (Trac 8896)
* Apply patch from https://svn.boost.org/trac10/ticket/8896
* Add compile-time test of RandomAccessNDImageViewConcept
  * Confirms the reported failure (tested with GCC 7.3 and clang 5.0)
  * Verifies correctness of the patch
2018-08-23 16:05:38 +02:00
Mateusz Loskot
9ac0cbca00
Merge pull request #122 from mloskot/ml/cmake-minor-fixes
Apply minor fixes to CMake configuration
2018-08-23 15:04:38 +02:00
Mateusz Łoskot
ced645c476 Apply minor fixes to CMake configuration [ci skip] 2018-08-23 15:03:42 +02:00
Mateusz Łoskot
cff6966020 Correct description of image_is_basic metafunction (Trac 2979) [ci skip]
https://svn.boost.org/trac10/ticket/2979 description:

The description of the metafunction boost::gil::image_is_basic says that
it will return mpl::true_ if the image uses a basic view and
std::allocator<unsigned char>, however the implementation returns true
for any kind images that use any kind of allocator.
2018-08-23 11:38:18 +02:00
Mikhail Gorbushin
eebe183375 remove std::bind2nd 2018-08-21 09:40:55 -04:00
Stefan Seefeld
56c2389500 Fix (some) warnings. 2018-07-29 13:50:25 -04:00
Mateusz Loskot
ea9fb1581f
Merge pull request #119 from jbeich/freebsd
Unbreak IO extensions on BSDs (1.68 regression)
2018-07-24 09:59:45 +01:00
Jan Beich
48643aa038 Don't use non-standard header for alloca()
In file included from /usr/local/include/boost/gil/extension/io/png/read.hpp:29:
In file included from /usr/local/include/boost/gil/io/get_reader.hpp:22:
In file included from /usr/local/include/boost/gil/io/get_read_device.hpp:26:
In file included from /usr/local/include/boost/gil/io/path_spec.hpp:23:
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
2018-07-20 14:17:23 +00:00
chhenning
e4af4fc2d6
Merge pull request #118 from adrianbroher/fix-png-grayalpha-load
Fix png grayalpha load
2018-07-18 17:37:49 -04:00
Marcel Metz
1253700adb Use png_get_valid to properly identify tRNS chunks in PNG files
When loading PNG images with "simple transparency" the IO extension
should expland the contained alpha palette into a proper alpha channel.
Currenty the code queries if the image contains an alpha channel, which
is different from an alpha palette.

Fixes: #117
2018-07-18 08:10:51 +02:00
Marcel Metz
21b5f685e8 Add test image to check loading of grayalpha PNG images with tRNS
A test image with 8-bit grayscale colorspace and simple alpha palette
(tRNS chunk).  Generated with ImageMagick (version: 6.9.9-38 Q16) by
invoking:

```
convert -size 64x64 xc:transparent \
  -stroke Firebrick -fill tomato -strokewidth 2 \
  -draw 'translate 32,32 circle 0,0 32,0' \
  -colorspace Gray -depth 8 \
  -density 28.35 -units PixelsPerCentimeter \
  grayalpha-with-tRNS-chunk.png
```
2018-07-18 08:10:51 +02:00