---
milena/ChangeLog | 5 +++++
milena/mln/io/magick/load.hh | 12 +++++++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 11c9b18..c613c22 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/io/magick/load.hh: set minimum resolution for PDF files to
+ 300DPI.
+
2010-04-30 Guillaume Lazzara <z(a)lrde.epita.fr>
Add some code in my sandbox.
diff --git a/milena/mln/io/magick/load.hh b/milena/mln/io/magick/load.hh
index 11d17bd..dfe9197 100644
--- a/milena/mln/io/magick/load.hh
+++ b/milena/mln/io/magick/load.hh
@@ -123,7 +123,17 @@ namespace mln
// abort();
//}
- Magick::Image im_file(filename);
+ Magick::Image im_file;
+ im_file.ping(filename);
+
+ // Force a minimum resolution of 300DPI for PDF document.
+ if (im_file.magick() == "PDF"
+ && (im_file.xResolution() < 300 || im_file.yResolution() < 300))
+ im_file.density(Magick::Geometry(300, 300));
+
+ im_file.read(filename);
+
+
im_file.modifyImage();
im_file.type(Magick::TrueColorType);
int columns = im_file.columns();
--
1.5.6.5
Show replies by date