* src/content_in_doc.cc: Set output format to DebugWithImage.
* scribo/io/img/save.hh: Do not subsample output image.
---
scribo/ChangeLog | 8 ++++++++
scribo/scribo/io/img/save.hh | 19 ++++++++-----------
scribo/src/content_in_doc.cc | 2 +-
3 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 503f4a5..3361823 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,13 @@
2012-11-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Save full size region debug image.
+
+ * src/content_in_doc.cc: Set output format to DebugWithImage.
+
+ * scribo/io/img/save.hh: Do not subsample output image.
+
+2012-11-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
* src/content_in_doc.cc: Add more options.
2011-12-06 Guillaume Lazzara <z(a)lrde.epita.fr>
diff --git a/scribo/scribo/io/img/save.hh b/scribo/scribo/io/img/save.hh
index a985d07..76c583b 100644
--- a/scribo/scribo/io/img/save.hh
+++ b/scribo/scribo/io/img/save.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011, 2012 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -39,8 +40,7 @@
# include <mln/core/image/image2d.hh>
# include <mln/value/rgb8.hh>
# include <mln/io/magick/save.hh>
-# include <mln/subsampling/antialiased.hh>
-# include <mln/data/transform_inplace.hh>
+# include <mln/data/transform.hh>
# include <scribo/core/document.hh>
@@ -160,11 +160,9 @@ namespace scribo
save_debug_without_image(const document<L>& doc)
{
mln_precondition(doc.is_valid());
- mln::image2d<value::rgb8>
- output(box2d(doc.image().domain().pmin() / 4,
- doc.image().domain().pmax() / 4));
+ mln::image2d<value::rgb8> output(doc.image().domain());
data::fill(output, literal::black);
- scribo::io::img::internal::debug_img_visitor<L> f(output, 4);
+ scribo::io::img::internal::debug_img_visitor<L> f(output, 1);
doc.accept(f);
return output;
}
@@ -174,11 +172,10 @@ namespace scribo
save_debug_with_image(const document<L>& doc)
{
mln_precondition(doc.is_valid());
- mln::image2d<value::rgb8>
- output = mln::subsampling::antialiased(doc.image(), 4);
internal::highlight_mask highlight(0.5f);
- data::transform_inplace(output, highlight);
- scribo::io::img::internal::debug_img_visitor<L> f(output, 4);
+ mln::image2d<value::rgb8>
+ output = data::transform(doc.image(), highlight);
+ scribo::io::img::internal::debug_img_visitor<L> f(output, 1);
doc.accept(f);
return output;
}
diff --git a/scribo/src/content_in_doc.cc b/scribo/src/content_in_doc.cc
index 010a423..0d2fcac 100644
--- a/scribo/src/content_in_doc.cc
+++ b/scribo/src/content_in_doc.cc
@@ -202,7 +202,7 @@ int main(int argc, char* argv[])
if (scribo::debug::logger().is_enabled())
scribo::io::img::save(doc, mln::debug::filename("regions.png"),
scribo::io::img::DebugWoImage);
if (options.opt_value("debug-regions") != "/dev/null")
- scribo::io::img::save(doc, options.opt_value("debug-regions"),
scribo::io::img::DebugWoImage);
+ scribo::io::img::save(doc, options.opt_value("debug-regions"),
scribo::io::img::DebugWithImage);
trace::exiting("main");
}
--
1.7.2.5
Show replies by date