Commit ef3bf88c authored by Yann Jacquelet's avatar Yann Jacquelet
Browse files

Fix LRDE norm fault in rgb8_to_rgn.hh

	* green/mln/fun/v2v/rg8_to_rgn.hh: Correct space location.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@4624 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 0a757997
2009-10-08 Yann Jacquelet <jacquelet@lrde.epita.fr>
Fix LRDE norm fault in rgb8_to_rgn.hh
* green/mln/fun/v2v/rg8_to_rgn.hh: Correct space location.
2009-10-08 Yann Jacquelet <jacquelet@lrde.epita.fr>
Add a new (red,green) value type.
......
......@@ -25,12 +25,12 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#ifndef MLN_FUN_V2V_RGB8_TO_RGBN_HH
#define MLN_FUN_V2V_RGB8_TO_RGBN_HH
#ifndef MLN_FUN_V2V_RGB8_TO_RGBN_HH
# define MLN_FUN_V2V_RGB8_TO_RGBN_HH
#include <mln/value/rgb8.hh>
#include <mln/value/rgb.hh>
#include <mln/core/contract.hh>
# include <mln/value/rgb8.hh>
# include <mln/value/rgb.hh>
# include <mln/core/contract.hh>
/// \file
///
......@@ -41,7 +41,7 @@ namespace mln
namespace fun
{
namespace v2v
{
......@@ -54,13 +54,13 @@ namespace mln
{
typedef value::rgb8 argument;
typedef value::rgb<n> result;
result operator()(const argument& c) const
{
mln_precondition(8 > n);
unsigned size = pow(2,(8-n));
/*
/*
std::cout << "c : " << c << std::endl;
std::cout << "red : " << c.red() << std::endl;
std::cout << "size : " << size << std::endl;
......@@ -68,13 +68,13 @@ namespace mln
std::cout << "max : " << (mln_max(mln::value::int_u<n>)) << std::endl;
*/
result res(c.red() / size, c.green() / size, c.blue() / size);
return res;
}
};
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment