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