Commit 04db12cd authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Merge branch 'next' into next-build-test

parents 738511d2 0d8813e6
2010-10-27 Roland Levillain <roland@lrde.epita.fr>
Remove a superfluous invocation of AM_CONDITIONAL regarding Magick++.
* configure.ac: Here.
2010-05-11 Roland Levillain <roland@lrde.epita.fr>
Distribute Scribo.
......
......@@ -208,7 +208,6 @@ OLN_WITH_LIB([CFITSIO], [fitsio.h], [cfitsio])
OLN_WITH_LIB_PKG_CONFIG([Magick++], [Magick++.h], [Magick++], [magickxx],
[MAGICKXX], [], [ImageMagick++])
AM_CONDITIONAL(HAVE_MAGICKXX, test "x$oln_have_magickxx" = xyes)
# ---- #
# Qt. #
......
2010-10-28 Roland Levillain <roland@lrde.epita.fr>
Handle properly non 8-bit Magick::Quantum's.
* mln/io/magick/load.hh
(mln::io::magick::load(Image<I>&, const std::string&))
* mln/io/magick/save.hh
(mln::io::magick::impl::get_color(const value::int_u8&))
(mln::io::magick::impl::get_color(const value::rgb8&)):
Properly convert values between Magick::Quantum and
mln::value::int_u8, and vice versa.
2010-10-27 Roland Levillain <roland@lrde.epita.fr>
Fix Boost.Tuple handling.
* tests/accu/Makefile.am (tuple_CPPFLAGS): New.
* tests/unit_test/Makefile.am (BOOST_TUPLE_CPPFLAGS): New.
2010-10-26 Roland Levillain <roland@lrde.epita.fr>
Fix Milena's distribution.
* Makefile.am (dist_img_DATA): Add img/picasso.ppm.
2010-11-18 Guillaume Lazzara <z@lrde.epita.fr>
 
* mln/io/pnm/save.hh: Add a fixme related to an ICE with GCC
......@@ -94,6 +94,7 @@ dist_img_DATA = \
img/medium.ppm \
img/picasso.pbm \
img/picasso.pgm \
img/picasso.ppm \
img/quite-small.pgm \
img/small.pbm \
img/small.pgm \
......
......@@ -35,8 +35,6 @@
/// <em>before</em> using any of these functions, as advised by the
/// GraphicsMagick documentation
/// (http://www.graphicsmagick.org/Magick++/Image.html).
///
/// \fixme: re-enable quantum size check
# include <cstdlib>
......@@ -142,9 +140,6 @@ namespace mln
{
trace::entering("mln::io::magick::load");
// Ensure a Magick++'s Quantum is an 8-bit value.
//mln::metal::equal<Magick::Quantum, unsigned char>::check();
I& ima = exact(ima_);
// FIXME: Handle Magick++'s exceptions (see either
......@@ -166,7 +161,17 @@ namespace mln
mln_piter(I) p(ima.domain());
for_all(p)
{
value::rgb8 c(pixels->red, pixels->green, pixels->blue);
/* Each channel of a Magick++ image is coded on a
Magick::Quantum value, which can be an 8-, 16- or 32-bit
integer. Load the most significant bits of each channel
into a component of an mln::value::rgb8 value (i.e., into
an mln::value::int_u8 value). */
value::rgb8 c(pixels->red >> 8 * (sizeof(Magick::Quantum)
- sizeof(value::rgb8::red_t)),
pixels->green >> 8 * (sizeof(Magick::Quantum)
- sizeof(value::rgb8::green_t)),
pixels->blue >> 8 * (sizeof(Magick::Quantum)
- sizeof(value::rgb8::blue_t)));
mln_value(I) res;
if (!impl::do_it(c, res))
{
......
......@@ -35,8 +35,6 @@
/// <em>before</em> using any of these functions, as advised by the
/// GraphicsMagick documentation
/// (http://www.graphicsmagick.org/Magick++/Image.html).
///
/// \fixme: re-enable quantum size check
# include <cstdlib>
......@@ -95,17 +93,33 @@ namespace mln
inline
Magick::Color get_color(const value::int_u8& value)
{
// Ensure a Magick++'s Quantum is an 8-bit value.
//mln::metal::equal<Magick::Quantum, unsigned char>::check();
return Magick::Color(value, value, value);
/* Each channel of a Magick++ image is coded on a
Magick::Quantum value, which can be an 8-, 16- or 32-bit
integer. Store the data from each mln::value::int_u8
values into the most significant bits of Magick::Color's
channels. */
return Magick::Color
(value << 8 * (sizeof(Magick::Quantum) - sizeof(value::int_u8)),
value << 8 * (sizeof(Magick::Quantum) - sizeof(value::int_u8)),
value << 8 * (sizeof(Magick::Quantum) - sizeof(value::int_u8)));
}
inline
Magick::Color get_color(const value::rgb8& value)
{
// Ensure a Magick++'s Quantum is an 8-bit value.
//mln::metal::equal<Magick::Quantum, unsigned char>::check();
return Magick::Color(value.red(), value.green(), value.blue());
/* Each channel of a Magick++ image is coded on a
Magick::Quantum value, which can be an 8-, 16- or 32-bit
integer. Store the data from each component of
mln::value::rgb8 values (of type mln::value::int_u8) into
the most significant bits of Magick::Color's
channels. */
return Magick::Color
(value.red() << 8 * (sizeof(Magick::Quantum)
- sizeof(value::rgb8::red_t)),
value.green() << 8 * (sizeof(Magick::Quantum)
- sizeof(value::rgb8::green_t)),
value.blue() << 8 * (sizeof(Magick::Quantum)
- sizeof(value::rgb8::blue_t)));
}
} // end of namespace mln::io::magick::impl
......
......@@ -54,6 +54,7 @@ transform_snake_SOURCES = transform_snake.cc
if HAVE_BOOST_TUPLE
check_PROGRAMS += tuple
tuple_SOURCES = tuple.cc
tuple_CPPFLAGS = $(AM_CPPFLAGS) $(BOOST_CPPFLAGS)
endif HAVE_BOOST_TUPLE
TESTS = $(check_PROGRAMS)
......@@ -51,6 +51,11 @@ $(srcdir)/unit-tests.mk: $(top_srcdir)/build-aux/build_unit_test.sh disabled_tes
milena/tests/unit_test/disabled_tests \
mln
# Handling Boost.Tuple-dependent programs: `boost.m4' defines
# BOOST_CPPFLAGS, but `unit-tests.mk' expects BOOST_TUPLE_CPPFLAGS;
# help it by defining the later using the former.
BOOST_TUPLE_CPPFLAGS = $(BOOST_CPPFLAGS)
include $(srcdir)/unit-tests.mk
MAINTAINERCLEANFILES = $(srcdir)/mln_*.cc
......
2010-10-25 Roland Levillain <roland@lrde.epita.fr>
Fix Swilena's dependency tracking.
* python/Makefile.am (%-wrap.cc %.py): Honor Automake's `AMDEP'
internal conditional.
2010-04-26 Roland Levillain <roland@lrde.epita.fr>
Canonize Swilena's tests' output file names.
......
......@@ -32,11 +32,12 @@ AM_LDFLAGS = -avoid-version -module -shared
## Run Swig to create the C++ wrapper files, the Python interface
## files, and the dependency Makefile snippets.
%-wrap.cc %.py: $(top_srcdir)/swilena/%.i
if $(SWIG) $(AM_SWIGFLAGS) $(SWIGFLAGS) -MD -MF "$(DEPDIR)/$*-wrap.Tcc" -o $@ $<; then \
mv -f "$(DEPDIR)/$*-wrap.Tcc" "$(DEPDIR)/$*-wrap.Pcc";\
else \
rm -f "$(DEPDIR)/$*-wrap.Tcc"; exit 1;\
fi
@AMDEP_TRUE@ if $(SWIG) $(AM_SWIGFLAGS) $(SWIGFLAGS) -MD -MF "$(DEPDIR)/$*-wrap.Tcc" -o $@ $<; then \
@AMDEP_TRUE@ mv -f "$(DEPDIR)/$*-wrap.Tcc" "$(DEPDIR)/$*-wrap.Pcc";\
@AMDEP_TRUE@ else \
@AMDEP_TRUE@ rm -f "$(DEPDIR)/$*-wrap.Tcc"; exit 1;\
@AMDEP_TRUE@ fi
@AMDEP_FALSE@ $(SWIG) $(AM_SWIGFLAGS) $(SWIGFLAGS) -o $@ $<
# ltihooks.py: Python import hooks that understand Libtool libraries.
......
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