MRaster lib 21.0.0.0
Image Processing Library
|
Header for the ramColor class. More...
#include "MRMathCPP.hpp"
#include <algorithm>
#include <array>
#include <bit>
#include <climits>
#include <cmath>
#include <complex>
#include <concepts>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <span>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | mjr |
Macros | |
#define | MJR_LOOK_FOR_128_BIT_TYPES MRASTER_OPT_128_INT |
Set to 1 to look for 128-bit integer types, and 0 to not look for them. | |
#define | MJR_INCLUDE_MRcolorTpl |
Typedefs | |
typedef uint64_t | mjr_uintBiggest_t |
The largest unsigned integer supported on the platform. | |
typedef int64_t | mjr_intBiggest_t |
The largest signed integer supported on the platform. | |
Functions | |
template<class clrChanT , int numChan, int redChanIdx = -1, int blueChanIdx = -1, int greenChanIdx = -1, int alphaChanIdx = -1> requires ((numChan>0) && // Must have at least 1 chan (std::is_unsigned<clrChanT>::value || std::is_floating_point<clrChanT>::value) && // unsigned integral or floating point (std::is_floating_point<clrChanT>::value || (sizeof(clrChanT) >= 1)) && // If clrChanT int, then must be >= 1 char size (redChanIdx < numChan) && (blueChanIdx < numChan) && (greenChanIdx < numChan) && (alphaChanIdx < numChan) && (((blueChanIdx < 0) && (redChanIdx < 0) && (greenChanIdx < 0)) || ((blueChanIdx >= 0) && (redChanIdx >= 0) && (greenChanIdx >= 0))) && // R, G, & B all non-negative or all negative ((alphaChanIdx < 0) || (redChanIdx >= 0)) && // If A is non-negative, then all non-negative ((redChanIdx < 0) || ((redChanIdx != greenChanIdx) && (redChanIdx != blueChanIdx) && (redChanIdx != alphaChanIdx) && (greenChanIdx != blueChanIdx) && (greenChanIdx != alphaChanIdx) && (blueChanIdx != alphaChanIdx)))) | |
std::ostream & | mjr::operator<< (std::ostream &out, colorTpl< clrChanT, numChan > const &color) |
i/O stream output operator for colorTpl types. | |
template<class clrChanT , int numChan, int redChanIdx = -1, int blueChanIdx = -1, int greenChanIdx = -1, int alphaChanIdx = -1> requires ((numChan>0) && // Must have at least 1 chan (std::is_unsigned<clrChanT>::value || std::is_floating_point<clrChanT>::value) && // unsigned integral or floating point (std::is_floating_point<clrChanT>::value || (sizeof(clrChanT) >= 1)) && // If clrChanT int, then must be >= 1 char size (redChanIdx < numChan) && (blueChanIdx < numChan) && (greenChanIdx < numChan) && (alphaChanIdx < numChan) && (((blueChanIdx < 0) && (redChanIdx < 0) && (greenChanIdx < 0)) || ((blueChanIdx >= 0) && (redChanIdx >= 0) && (greenChanIdx >= 0))) && // R, G, & B all non-negative or all negative ((alphaChanIdx < 0) || (redChanIdx >= 0)) && // If A is non-negative, then all non-negative ((redChanIdx < 0) || ((redChanIdx != greenChanIdx) && (redChanIdx != blueChanIdx) && (redChanIdx != alphaChanIdx) && (greenChanIdx != blueChanIdx) && (greenChanIdx != alphaChanIdx) && (blueChanIdx != alphaChanIdx)))) | |
bool | mjr::operator!= (colorTpl< clrChanT, numChan > const &color1, colorTpl< clrChanT, numChan > const &color2) |
Inequality operator for colorTpl types. | |
Header for the ramColor class.
Copyright (c) 1988-2015, Mitchell Jay Richling https://www.mitchr.me All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file MRcolorTpl.hpp.
#define MJR_LOOK_FOR_128_BIT_TYPES MRASTER_OPT_128_INT |
Set to 1 to look for 128-bit integer types, and 0 to not look for them.
Right now this only works on GCC & Clang!
Definition at line 60 of file MRcolorTpl.hpp.
#define MJR_INCLUDE_MRcolorTpl |
Definition at line 5190 of file MRcolorTpl.hpp.
typedef uint64_t mjr_uintBiggest_t |
The largest unsigned integer supported on the platform.
Definition at line 81 of file MRcolorTpl.hpp.
typedef int64_t mjr_intBiggest_t |
The largest signed integer supported on the platform.
Definition at line 82 of file MRcolorTpl.hpp.