Commit Graph

328 Commits

Author SHA1 Message Date
Mateusz Loskot
0e11759d4e
Apply clang-tidy modernize-use-using to extension/dynamic_image (#193)
Run clang-tidy 7.0 with `-checks='-*,modernize-use-using' -fix`
against single TU with `#include <boost/gil/concepts/*.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/dynamic_image/*.hpp should return 5 matches,
in definitions of macros (TODO).
2018-12-16 01:25:12 +01:00
Mateusz Loskot
46939c7b29
Apply clang-tidy modernize-use-using to core headers (#192)
Run clang-tidy 7.0 with `-checks='-*,modernize-use-using' -fix`
against single TU with `#include <boost/gil/concepts/*.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 top-level core headers should return no matches.
2018-12-15 19:10:30 +01:00
Mateusz Łoskot
4616dc1bdc [numeric] Remove unused type alias from detail::correlate_rows_imp
Fix warning: typedef kernel_type locally defined but not used
[-Wunused-local-typedefs]
2018-12-15 01:03:43 +01:00
Samuel Debionne
6b0b66c0f2 Remove deprecated unary/binary_function (#191)
std::unary_function and std::binary_function are deprecated in C++11
and removed in C++17.
2018-12-14 22:58:55 +01:00
Mateusz Loskot
230158bd66
Fix const on return type not applied to pointee type of typedef (#190)
Replace png_structp and png_infop aliases with regular pointers to
to prevent type qualifiers ignored on function return type.
2018-12-14 08:12:45 +01:00
Mateusz Loskot
2250b7159c
Fix conflicting definitions from io/dynamic_io_new.hpp and toolbox/dynamic_images.hpp (#185)
The problem appears to be due to the same definitions copied from one
part of the library to the other.
The definitions have been shuffled to fix the compilation,
but purely based on searching the code for what is used where,
thus without confidence where those belong by author's intention.

Fixes #183
2018-12-12 17:58:57 +01:00
Mateusz Loskot
e0288ece9e
Apply clang-tidy modernize-use-nullptr (#180)
Used clang-tidy 7.0 with the command:

  run-clang-tidy.py \
      -header-filter='boost\/gil\/.*' \
      -checks='-*,modernize-use-nullptr' -fix

Update CONTRIBUTING.md on how to generate compile command
database and run clang-tidy.
2018-12-10 09:58:37 +01:00
Mateusz Loskot
682a7264da
Include missing headers across boost/gil/extension/io (#179)
Missing headers revealed by compilation of self-contained header tests.
2018-12-09 23:40:38 +01:00
Mateusz Loskot
032a4786bb
Remove unnecessary extern C around libraw.h include (#178)
Since libraw is C++ library, not C, it is always built as C++ library.
2018-12-09 21:38:59 +01:00
Mateusz Loskot
057a02ad0a
Replace writer<Device,jpeg_tag> where writer_backend<Device,jpeg_tag> expected (#177)
The reference to `writer<Device,jpeg_tag>` is clearly incorrect:
- writer has no members `init_device`, `empty_buffer`, `closed_buffer`
- if use of writer was correct there, it would require
  `#include <boost/gil/extension/io/jpeg/detail/writer.hpp>`, but that
  would impose cyclic-dependency between writer.hpp and writer_backend.hpp.
2018-12-09 15:45:51 +01:00
Mateusz Łoskot
8c26143574
Add missing #include <boost/gil/extension/io/*/tags.hpp>
Fixes compilation error about undeclared *_tag.
2018-12-08 22:20:58 +01:00
Mateusz Łoskot
a0b5767392 Add missing #include <boost/gil/extension/io/raw/tags.hpp>
Fixes compilation error about undeclared raw_tag.
2018-12-08 12:10:59 +01:00
Mateusz Loskot
63e2a1a98a
Fix compile-time bugs subchroma_image.hpp definions (#164)
Add missing typename in mpl::if_ condition result.
Restore BOOST_CXX14_CONSTEXPR in boost::algorithm::clamp function
- apparently, GCC 5.5.0 does not compile it with C++11 constexpr.
Still not adding subchroma_image.cpp to toolbox test target
input sources due to run-time failure.

Depends on #176
2018-12-07 23:55:13 +01:00
Mateusz Loskot
443eaa5fae
Fix compilation of subchroma_image.hpp as self-contained headers (#176)
Rename `Scaling_Factors` to lower-case, as well as its template parameters.
Move `scaling_factors` to namespace `detail` and before it is use.
Fix access to `scaling_factors` members in derived classes.
Add missing `typename`.
Remove superfluous thus incorrect `typename`.
Remove `subchroma_image_view` implicit friends with self
- Fixes template parameter aliasing for Locator and Factors.

Subset of fixes from pending PR #164
2018-12-07 16:00:17 +01:00
Mateusz Loskot
9e9ed7c239
Add missing #include-s to ensure self-contained headers (#175) 2018-12-07 09:50:52 +01:00
Mateusz Loskot
40241a6efb
Reformat boost/gil/concepts/*.hpp to limit line length to 90 characters (#173)
Replace `typedef` with using declaration.
Replace complex return type declared for functions with trailing return type and `auto`.
Format complex metaprogramming constructs in clear and readable way.
Remove superfluous `public` access specifier from `struct` inheritance.
Rename ambiguous type aliases.
Make template parameters
- upper-case (if initials e.g. `CS`)
- camel-case if multi-word (e.g. `ColorSpace`).
2018-12-06 19:11:58 +01:00
Mateusz Loskot
66bb07d02b
Trim trailing whitespaces in all source code files (#171)
PowerShell script used to perform the trimming:

Get-ChildItem -Recurse -Include @("*.cpp", "*.hpp") |
  ForEach-Object { (Get-Content $_.FullName)
      | Foreach {$_.TrimEnd()} | Set-Content $_.FullName }
2018-12-05 08:51:33 +01:00
Mateusz Loskot
7b5b01ec14
Split single boost/gil/concepts.hpp into boost/gil/concepts/*.hpp (#169) 2018-11-17 23:36:29 +01:00
Mateusz Łoskot
28df5bc482
Clean up several warnings about unreferenced formal parameters
Add comment to premultiply.hpp:
- FIXME: Is c input paramater not used intentionally?
2018-10-29 15:26:53 +01:00
Mateusz Loskot
3947b798fb
Remove dependency on boost/algorithm/clamp.hpp (#159)
Copy boost::algorithm::clamp to where it was solely used in Toolbox.
Remove typename where not needed thus not allowed:
- fixes error: expected nested-name-specifier
- GCC and clang issue diagnostics; latest MSVC does not, seems not even
  parsing templates until they are used.
2018-10-29 13:48:15 +01:00
Mateusz Loskot
a1c966dd9b
Fix point<T> divide and multiply to not to hardcode result as point<double> (#157)
The free variants of operator/ and operator* now yield new
type of point<T> with T promoted to type common for both operands.

Add missing member operator*=, for symmetry.
Add template function iround(point<T>) as no-op sink for point
specialisations for T of integer types.
Add explicit casts of arithmetic intermediate results to avoid
compilation warnings.
Replace redundant point<T> construction in return statement with uniform
initialization.
Add static_assert validating range of axis_value integer template parameter.

Update test/point/point.cpp with basic checks of all point<T> members.

Fixes #153
2018-10-24 15:08:39 +02:00
Mateusz Loskot
c1e590591d
Remove dependency on boost/config/no_tr1/cmath.hpp (#162) 2018-10-24 10:53:47 +02:00
Mateusz Loskot
e286137e55
Remove dependency on boost/algorithm/string.hpp as unused (#158) 2018-10-24 09:42:17 +02:00
Mateusz Łoskot
3b8398f17c
Fix version.hpp include guard name [ci skip] 2018-10-22 15:05:21 +02:00
Mateusz Loskot
ce82941fa2
Rename point2<T> to point<T> (#155)
Add point2<T> alias template for backward compatibility with Boost <=1.68.
Replace multiple point_t aliases of point<ptrdiff_t> with single defined
in point.hpp. The point_t is common used to represent dimensions.
Replace many uses of point<ptrdiff_t> with point_t.

Apply reformatting around point2 changes to respect the line length limit.

Follows up discussion in #154
2018-10-19 09:32:23 +02:00
Mateusz Loskot
b4c3a69479
Extract point2<T> from utilities.hpp to point.hpp (#154)
The point belongs to core basic concepts in GIL, not an optional
utility. The tutorial starts with description of point.
Such core concepts are defined in dedicated headers which is quite
a useful convention that also makes the code structure clearer.

Remove from trivial point2 class superfluous empty destructor,
copy constructor, assignment operator.

Clean up point.hpp formatting (eg. respect line length limit).

Co-authored-by: Nikita Kniazev @Kojoley
2018-10-18 21:38:14 +02:00
Mateusz Łoskot
875136885a
Fix conflict with std::fill_n and boost::range::fill_n (Trac 7189)
Add minimal test for the std::fill and boost::array or std::array as
pixel type.
2018-10-12 18:34:28 +02:00
Mateusz Loskot
aa323e1dc6
Merge pull request #146 from mloskot/ml/fix-some-gcc-warnings
Fix some gcc warnings
2018-10-04 20:29:44 +02:00
Mateusz Łoskot
244be70c1d
Add #include directives with missing headers
Make core and io headers self-contained.
Required by test to verify headers are self-contained in #147.
2018-10-03 23:27:57 +02:00
Mateusz Łoskot
ed96c9cdf1
Use GCC pragma to disable -Wconversion and -Wfloat-equal
Fixes warnings where equality or assignment operators
applied to operands of different signedness or float-point.
2018-09-28 23:36:27 +02:00
Mateusz Łoskot
4bd625ff31
Replace unsigned with signed for int as compile-time index 2018-09-28 23:30:35 +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 Ł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 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
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 Ł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
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 Ł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 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 Łoskot
871b7b6897 Fix warning about assigned but unused variable num_elements 2018-08-25 22:54:29 +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 Ł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
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
Stefan Seefeld
51cf617c63 Fix 'raw' IO extension. 2018-07-15 20:37:06 -04:00
Mateusz Łoskot
c95bcf96ad Remove #define GIL_VERSION "2.1.2"
The macro was replaced by recently added gil/version.hpp

Closes #82
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
e4322aa094 Remove dependency on Boost.SmartPtr
Replace boost::shared_ptr with C++11 std::shared_ptr.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
a435900b34 Remove dependency on boost::lexical_cast
Replace lexical_cast with C++11 std::to_string function.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
8e1db33826 Remove dependency on boost::array
Replace boost::array with C++11 std::array.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
472d1e57d3 Fix warning: extra ';' [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
cc6ba0ae72 Disable unaligned pointer access
Rename GIL_NONWORD_POINTER_ALIGNMENT_SUPPORTED
    to BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS.
Undefine BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS by default and document it.
If defined, issue warning or error, depending on target platform.

This changes how packed_channel_reference_base-based channels perform
access - aligned memory access by default.

This also fixes undefined behavior detected by UBSan in some test cases.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
94f5ad613a Use promote_integral in channel_invert algorithm
This should help to avoid UB due to possible signed integer overflows,
for minimum/maximum of input channel domain.

Fixes #89
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
2658e2059a Replace some of Boost.MPL and Boost.TypeTraits with C++11 equivalents
Non-functional refactoring of promote_integral added in #91
Clean up 128-bit support remains.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
b8af11db87 Add promote_integral metafunction
Copied from Boost.Geometry, including original tests, with some non-functional
modifications explained in the comments.
The utility can be used where it is important to avoid integer overflow.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
9f4bc93ad6 Replace boost::integer_traits with std::numeric_limits
std::numeric_limits<T>::max() is constexpr since C++11
2018-06-27 00:02:27 -04:00
Mateusz Loskot
b80667f0c6 [io/bmp] Explain DIB orientation variants that affect reading
Trim trailing whitespaces (.editorconfig)

[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
47461ab59c Fix -Wconversion about float from unsigned int (#84)
Use of gil::float32_t type members typedefs with variables for half-results.
Observing intermediate values migth be useful during debugging.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
ed67f9a571 Replace bitsN[s] aliases with C++11 fixed width integer types
Import the selection of integer types into boost::gil namespace,
  and move from channel.hpp to typedefs.hpp for easier access.
Replace bits32f with float32_t and bits64f with float64_t
  - kept as alias of scoped_channel_value.
Move float64_t (bits64f) to typedefs.hpp.
Replace the four {float|double}_{zero|one} min/max channel values
  with float_point_zero and float_point_one templates.
Replace <boost/cstdint,hpp> with C++11 <cstdint>.

Introduce preference of using declaration instead of typedef.
Reformat typedefs.hpp to take advantage of the using declaration
  - works much better for left-to-right reading, alias name as
    most important detail comes first.
Add some of missing #include typedefs.hpp, sort some headers.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
f3fd792787 Test float-point divisor for less/greater-than Zero
Add divisor check to point2<T>::operator/=, if Zero do nothing.

This hack helps to avoid compiler warnings without
polluting the source with pragmas.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
99f765c24c Remove #if _MSC_VER > 1310 as always true since switch to C++11 2018-06-27 00:02:27 -04:00
Mateusz Loskot
056415f513 Improve casts in channel_convert_from_unsigned (refines PR #74) (#76)
Add cast to explicitly indicate val promotion to at least
32-bit integer. The arithmetic operations are performed on
int of higher rank type. Finally, since the result value is
guaranteed to fit range of 8/16-bit result integer type,
it is safe to cast.
This should make it clearer for a reader that subtleties
of implicit promotions and conversions have been considered.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
0984b7586b Fix some warnings reported by clang (#74)
- unused parameter
- shadowed typedef
- implicit conversion changes signedness:
  int to signed <int>
  int to unsigned <int>

Note, arithmetic op is performed on int as higher rank type
with result is in range of return type, safe to cast.
2018-06-27 00:02:27 -04:00
Stefan Seefeld
2a74410c4e Rename top-level IO extension headers. (#71)
Refactor IO extension headers.
2018-06-27 00:02:27 -04:00
Stefan Seefeld
1f0bc35012 Introduce top-level gil.hpp header. (#70)
Introduce top-level boost/gil.hpp header.
2018-06-27 00:02:27 -04:00
Daniela Engert
bf4e22957f Most members of std::allocate are deprecated in C++17
Replace them by their cousins from std::allocator_traits.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-06-27 00:02:27 -04:00
Mateusz Loskot
d754d41373 Fix MSVC warning: C4100 unreferenced formal parameter 2018-06-27 00:02:27 -04:00
Mateusz Loskot
6c230bf1cf Remove redundant local num_values in packed_channel_reference_base::set()
Pre-defined packed_channel_reference_base::set::num_values already
represents the value.
Fixes warning C4458: declaration of 'num_values' hides class member
2018-06-27 00:02:27 -04:00
Gogs
fac3ffe7c8 Updated targa reader to support screen origin bit. 2018-06-27 00:02:27 -04:00
Mateusz Loskot
94a4abee52 Fix potentially uninitialized local variable y
Continuation of #64
2018-06-27 00:02:27 -04:00
Daniela Engert
a3b8c7eb77 Conditionally replace deprecated/removed C++98 binder by more modern equivalent, and inline deprecated/removed C++98 function adapters.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-06-27 00:02:27 -04:00
Stefan Seefeld
4f3b5187c6 Suppress concept-related compiler warnings. (#65)
* Suppress concept-related compiler warnings.
* Fix more warnings.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
b6174343af Fix UB due to overflowing bit-shift operation (#68)
Patch courtesy of Andrey Semashev via Boost ML.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
dd268e8f67 Fix potentially uninitialized local variable y
Minor severity: compiler warning clean up
2018-06-27 00:02:27 -04:00
Christian Henning
d881a3c8db Fixed issues raised by reviewer 2018-06-27 00:02:27 -04:00
Christian Henning
9a7bfe8f71 generate indexed_image_view from two views 2018-06-27 00:02:27 -04:00
Christian Henning
dfc86f6895 Added version.hpp 2018-06-27 00:02:27 -04:00
martin-osborne
29fa74d930 Added support for screen origin bit of targa files (Ticket 8429)
Currently GIL refuses to load TARGA files whose screen origin is
in the upper left-hand corner.  See Trac ticket 8429 for sample
image files created from GIMP 2.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
7a2bfd9360 Fix test of TARGA header descriptor for 24bpp file (#42)
Ensure that for TARGA Data Type 1, entire descriptor byte is set to 0.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
812203fec9 Fix implicit int to libjpeg boolean conversion
Apparently, clang-802.0.42 (Apple LLVM version 8.1.0) is
complaining as per the recent Travis CI build failures.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
0570cbaa2a Remove uncommented raw URL
Likely, committed by accident as part of fix of #33
2018-06-27 00:02:27 -04:00
Christian Henning
2bc4f9df91 #34 2018-06-27 00:02:27 -04:00
Christian Henning
72ee74900c #31 if stream is bad then throw 2018-06-27 00:02:27 -04:00
Christian Henning
60cf7f75a2 #33 2018-06-27 00:02:27 -04:00
Christian Henning
6676481458 #32 2018-06-27 00:02:27 -04:00
Stefan Seefeld
4dd3679ee2 Eliminate warning. 2018-06-27 00:02:27 -04:00
Stefan Seefeld
56411353cf Conditionalize png tags to libpng API changes. 2018-06-27 00:02:27 -04:00
Stefan Seefeld
34011225c0 Fix compilation errors. 2018-06-27 00:02:27 -04:00
Christian Henning
b46b3e12e7 tiff writing premul 2018-06-27 00:02:27 -04:00
Christian Henning
535c17b786 some patches for bmp and tiff 2018-06-27 00:02:27 -04:00
Peter Dimov
83aa397f23 Remove use of boost/config/suffix.hpp 2018-06-27 00:02:27 -04:00
Benjamin Buch
a1b0d1d0e6 Fix includes in extension/numeric/convolve.hpp 2018-06-27 00:02:27 -04:00
martin-osborne
cfe606ab7c Added support for screen origin bit of targa files (Ticket 8429)
Currently GIL refuses to load TARGA files whose screen origin is
in the upper left-hand corner.  See Trac ticket 8429 for sample
image files created from GIMP 2.
2018-06-27 00:02:27 -04:00
Antony Polukhin
f15b385d96 Removed inclusion of the boost/cast.hpp (functions from this library were not used) 2018-06-27 00:02:27 -04:00
William Gallafent
22697e0e66 Correct header inclusion 2018-06-27 00:02:27 -04:00
William Gallafent
4aec98c7bf Minor header / indent correction 2018-06-27 00:02:27 -04:00
William Gallafent
0fce727b93 Improve handling of multi-valued properties in TIFF, and fix some problems with ICC profiles in PNG 2018-06-27 00:02:27 -04:00
William Gallafent
180d7326b1 Minor changes for extraneous duplicate line, and constness 2018-06-27 00:02:27 -04:00
William Gallafent
eb3d3d919d Neaten up multi-element property handling by using fusion vectors, and switch extrasamples property to work in this way. Add ability to load and save ICC colour profile information. 2018-06-27 00:02:27 -04:00
Daniel James
a213a0efb2 Clean up faulty merge in 42fcf6d.
This deletes a few files that were previously deleted in develop, in 243fa33.
2018-06-27 00:02:27 -04:00
Christian Henning
a2a74eb8c4 Adding boost license 2018-06-27 00:02:27 -04:00
William Gallafent
af43112b22 Get TIFF physical resolution load / save sorted out 2018-06-27 00:02:27 -04:00
William Gallafent
11c6910bf4 Allow more complex properties (with more than one element) to be set when saving TIFF. 2018-06-27 00:02:27 -04:00
William Gallafent
271f5fdf3c Initial implementation of premultiplier, which is used when saving TIFF (since by convention this uses premultiplied alpha) 2018-06-27 00:02:27 -04:00
William Gallafent
85a02eaade First bit of getting alpha channels saved in TIFF files. The Extra Samples tag is now set. 2018-06-27 00:02:27 -04:00
William Gallafent
5b2e3ef0c7 Match original indenting 2018-06-27 00:02:27 -04:00
William Gallafent
e981553f92 Fix inverted logic deciding whether to use the user's specified value, or a “guessed” value based on the pixel type of the image, when saving a TIFF. 2018-06-27 00:02:27 -04:00
William Gallafent
b3ea3169df Fix incorrect arithmetic in CMYK -> RGB conversion 2018-06-27 00:02:27 -04:00
William Gallafent
39926162af Remove duplicate definition of this_t in pnm format's scanline_reader 2018-06-27 00:02:27 -04:00
Lubomir Bourdev
22ab5ce041 GIL: Added support for copying between variants of different types
[SVN r61899]
2018-06-27 00:02:27 -04:00
Christian Henning
fc5e0eb35b Small bugfix.
[SVN r85975]
2018-06-27 00:02:27 -04:00
Christian Henning
b90e1780d6 Fixed compiler errors with gcc.
[SVN r85549]
2018-06-27 00:02:27 -04:00
Christian Henning
bd2bd44b5b Added missing typename specifiers.
[SVN r85506]
2018-06-27 00:02:27 -04:00
Christian Henning
3e9b6893e1 small bugfix when calculating v plane offset.
[SVN r85436]
2018-06-27 00:02:27 -04:00
Christian Henning
d35d8db0c0 Replacing boost::conditional with boost::bool_.
[SVN r85433]
2018-06-27 00:02:27 -04:00
Christian Henning
fe1e686ad5 Set compiler symbol indicating an older libpng version.
[SVN r84990]
2018-06-27 00:02:27 -04:00
Christian Henning
e566f3de71 removed duplicate typedef.
[SVN r84989]
2018-06-27 00:02:27 -04:00
Christian Henning
af5c97bf59 Removing compiler warnings for x86 builds.
[SVN r84884]
2018-06-27 00:02:27 -04:00
Christian Henning
179a286447 Added compiler symbol to allow compiling with libpng 1.4 or lower.
[SVN r84883]
2018-06-27 00:02:27 -04:00
Christian Henning
56c5f9c446 Added comment explaining how memory will be reused when possible.
[SVN r84658]
2018-06-27 00:02:27 -04:00
Christian Henning
ae0bd42d22 Fixing image recreate.
[SVN r84600]
2018-06-27 00:02:27 -04:00
Christian Henning
896cff3534 bug fix relating to png's compression settings.
[SVN r84469]
2018-06-27 00:02:27 -04:00
Christian Henning
6bd2a8a25e Fixed syntax error.
[SVN r84461]
2018-06-27 00:02:27 -04:00
Christian Henning
68b36f5be8 Eliminated linker errors.
[SVN r84446]
2018-06-27 00:02:27 -04:00
Christian Henning
74ed5ca92d Added some metafunctions to fulfill some og gil's concepts.
[SVN r84391]
2018-06-27 00:02:27 -04:00
Christian Henning
cb66285008 Small bug fix.
[SVN r84269]
2018-06-27 00:02:27 -04:00
Christian Henning
9e12705b03 Some fixes when recreating an image.
[SVN r84094]
2018-06-27 00:02:27 -04:00
Christian Henning
a3b179cfa8 Some small corrections.
[SVN r84090]
2018-06-27 00:02:27 -04:00
Christian Henning
33f87ab1cd Fixed bug with recreate and planar images.
[SVN r84081]
2018-06-27 00:02:27 -04:00
Christian Henning
671625f4e4 Added support for different kinds of subchroma image types.
[SVN r84079]
2018-06-27 00:02:27 -04:00
Christian Henning
1900b7d2ed Added ycbcr 709 pixel type and conversions.
[SVN r84060]
2018-06-27 00:02:27 -04:00
Christian Henning
111fcc5222 fixed a merging issue.
[SVN r84050]
2018-06-27 00:02:27 -04:00
Christian Henning
cb61657ad6 Fix for reusing memory in image class.
[SVN r84049]
2018-06-27 00:02:27 -04:00
Christian Henning
83d2797277 reverted back fix to reuse memory.
[SVN r84048]
2018-06-27 00:02:27 -04:00
Christian Henning
5b6ef45728 Correcting wrong fix committed before.
[SVN r84041]
2018-06-27 00:02:27 -04:00
Christian Henning
06945ef7d9 Fix for reusing memory when recreating an image.
[SVN r84040]
2018-06-27 00:02:27 -04:00
Christian Henning
cb8907835c Added some more parameter to configure libpng on how to write images.
[SVN r83970]
2018-06-27 00:02:27 -04:00
Christian Henning
8c2b315fd8 Added sub-image factors as template parameters.
[SVN r83883]
2018-06-27 00:02:27 -04:00
Christian Henning
c9267d3ffe Change to more appropriate image type name.
[SVN r83876]
2018-06-27 00:02:27 -04:00
Christian Henning
707ff7f656 Added pixel by pixel multiplication and division.
[SVN r83634]
2018-06-27 00:02:27 -04:00
Christian Henning
b844bc1f85 * Added integer optimization for bit8 channels.
* fixed compiler error

[SVN r83605]
2018-06-27 00:02:27 -04:00
Christian Henning
2953f97bce * Exchanged GIL_FORCEINLINE with BOOST_FORCE_INLINE.
* Eliminated some useless warnings.

[SVN r83577]
2018-06-27 00:02:27 -04:00
Christian Henning
80368d304c First version of subsampled_image.
[SVN r83501]
2018-06-27 00:02:27 -04:00
Christian Henning
58df25bc2d Added some comments.
[SVN r83500]
2018-06-27 00:02:27 -04:00