* scribo/core/document.hh [SCRIBO_NMAGICK]: Disable everything
related to mln::io::magick.
---
scribo/ChangeLog | 7 +++++++
scribo/scribo/core/document.hh | 13 ++++++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index bd66473..30a15af 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,10 @@
+2013-07-29 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Lift scribo::document's dependency on Magick++.
+
+ * scribo/core/document.hh [SCRIBO_NMAGICK]: Disable everything
+ related to mln::io::magick.
+
2013-06-25 Roland Levillain <roland(a)lrde.epita.fr>
* scribo/text/recognition.hh: Aesthetic changes.
diff --git a/scribo/scribo/core/document.hh b/scribo/scribo/core/document.hh
index 1250dcb..629047e 100644
--- a/scribo/scribo/core/document.hh
+++ b/scribo/scribo/core/document.hh
@@ -34,7 +34,10 @@
# include <mln/core/image/image2d.hh>
# include <mln/core/alias/neighb2d.hh>
# include <mln/value/rgb8.hh>
-# include <mln/io/magick/load.hh>
+
+# ifndef SCRIBO_NMAGICK
+# include <mln/io/magick/load.hh>
+# endif // ! SCRIBO_NMAGICK
# include <scribo/core/component_set.hh>
# include <scribo/core/line_set.hh>
@@ -95,7 +98,13 @@ namespace scribo
document(const char *filename,
const mln::image2d<mln::value::rgb8>& input);
+ /* FIXME: This is bad, as it changes the interface of the class.
+ But this is probably the smallest change to lift the dependency
+ of this class on Magick++. We shall probably get rid of this
+ open() method anyway. */
+# ifndef SCRIBO_NMAGICK
void open();
+# endif // ! SCRIBO_NMAGICK
bool is_open() const;
const char * filename() const;
@@ -235,6 +244,7 @@ namespace scribo
}
+# ifndef SCRIBO_NMAGICK
template <typename L>
void
document<L>::open()
@@ -242,6 +252,7 @@ namespace scribo
mln_precondition(data_ != 0);
mln::io::magick::load(data_->image_, data_->filename_);
}
+# endif // ! SCRIBO_NMAGICK
template <typename L>
--
1.7.10.4
Show replies by date