This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/magick-improvements has been updated
discards eca09c3768543be05f6d207c2947d66e13109b28 (commit)
via e42c33ee80ab8dce3a77644a9ba5b4e6cf6d1521 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (eca09c3768543be05f6d207c2947d66e13109b28)
\
N -- N -- N (e42c33ee80ab8dce3a77644a9ba5b4e6cf6d1521)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
e42c33e tests/io/magick/save.cc: Kill compilation warnings.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch exp/magick-improvements has been created
at eca09c3768543be05f6d207c2947d66e13109b28 (commit)
- Log -----------------------------------------------------------------
eca09c3 tests/io/magick/save.cc: Kill compilation warnings.
027bc33 Add save options to magick::save.
bf546a8 Add a new routine to get image headers thanks to GraphicsMagick.
-----------------------------------------------------------------------
hooks/post-receive
--
Olena, a generic and efficient image processing platform
* mln/io/magick/save.hh: Add save_options structure.
---
milena/ChangeLog | 6 ++
milena/mln/io/magick/save.hh | 141 ++++++++++++++++++++++++++++++++++-------
2 files changed, 123 insertions(+), 24 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1e49435..775731e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2013-04-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add save options to magick::save.
+
+ * mln/io/magick/save.hh: Add save_options structure.
+
+2013-04-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add a new routine to get image headers thanks to GraphicsMagick.
* mln/io/magick/get_header.hh,
diff --git a/milena/mln/io/magick/save.hh b/milena/mln/io/magick/save.hh
index d8ca8a1..8437462 100644
--- a/milena/mln/io/magick/save.hh
+++ b/milena/mln/io/magick/save.hh
@@ -58,29 +58,71 @@ namespace mln
namespace magick
{
- /*! \brief Save a Milena image into a file using Magick++.
- \overload
+ /*!
+ \brief Store specific save options to use with Magick++.
+ \ingroup iomagick
+ */
+ struct save_options
+ {
+ save_options();
+
+ /*! \brief Define the compression algorithm.
+
+ By default it is set to Magick::NoCompression.
+ */
+ Magick::CompressionType compression_type;
+
+ /*! \brief Define the image type in output (RGB, Bilevel,...).
+
+ By default it is set to Magick::OptimizeType which will
+ decide automatically the best type according to image
+ characteristics.
+ */
+ Magick::ImageType image_type;
+ };
+
- \param[in] ima The image to save.
- \param[in] filename The name of the output file.
+ /*!
+ \brief Save a Milena image into a file using Magick++.
+ \overload
- \ingroup iomagick
+ \param[in] ima The image to save.
+ \param[in] filename The name of the output file.
+
+ \ingroup iomagick
*/
template <typename I>
void
save(const Image<I>& ima, const std::string& filename);
- /*! \brief Save a Milena image into a file using Magick++.
- \param[in] ima The image to save.
+ /*!
+ \brief Save a Milena image into a file using Magick++.
+ \overload
+
+ \param[in] ima The image to save.
+ \param[in] options Save options.
+ \param[in] filename The name of the output file.
+
+ \ingroup iomagick
+ */
+ template <typename I>
+ void
+ save(const Image<I>& ima, const save_options& options,
+ const std::string& filename);
+
+ /*!
+ \brief Save a Milena image into a file using Magick++.
+ \overload
- \param[in] opacity_mask Mask used to set pixel opacity_mask in output
- image. Output format must support this feature to be taken
- into account.
+ \param[in] ima The image to save.
+ \param[in] opacity_mask Mask used to set pixel opacity_mask in output
+ image. Output format must support this feature to be taken
+ into account.
- \param[in] filename The name of the output file.
+ \param[in] filename The name of the output file.
- \ingroup iomagick
+ \ingroup iomagick
*/
template <typename I, typename J>
void
@@ -88,20 +130,39 @@ namespace mln
const std::string& filename);
- // FIXME: Unfinished?
-#if 0
- /** Save a Milena tiled image into a file using Magick++.
+ /*!
+ \brief Save a Milena image into a file using Magick++.
- \param[out] ima The image to save.
- \param[in] filename The name of the output file. */
- template <typename T>
+ \param[in] ima The image to save.
+ \param[in] opacity_mask Mask used to set pixel opacity_mask in output
+ image. Output format must support this feature to be taken
+ into account.
+ \param[in] options Save options.
+ \param[in] filename The name of the output file.
+
+ \ingroup iomagick
+ */
+ template <typename I, typename J>
void
- save(const Image< tiled2d<T> >& ima, const std::string& filename);
-#endif
+ save(const Image<I>& ima, const Image<J>& opacity_mask,
+ const save_options& options, const std::string& filename);
# ifndef MLN_INCLUDE_ONLY
+ namespace internal
+ {
+
+ inline
+ void set_options(Magick::Image& magick_ima,
+ const save_options& options)
+ {
+ magick_ima.compressType(options.compression_type);
+ magick_ima.type(options.image_type);
+ }
+
+ } // end of mln::io::magick::internal
+
namespace impl
{
@@ -468,10 +529,22 @@ namespace mln
} // end of namespace mln::io::magick::internal
+ // save_options
+ inline
+ save_options::save_options()
+ : compression_type(Magick::NoCompression),
+ image_type(Magick::OptimizeType)
+ {
+ }
+
+
+
+ // Facades
+
template <typename I, typename J>
void
save(const Image<I>& ima_, const Image<J>& opacity_mask_,
- const std::string& filename)
+ const save_options& options, const std::string& filename)
{
mln_trace("mln::io::magick::save");
@@ -524,21 +597,41 @@ namespace mln
internal::paste_data_dispatch(ima, magick_ima);
}
+ // Take options into account.
+ internal::set_options(magick_ima, options);
+
magick_ima.write(filename);
}
-
-
template <typename I>
inline
void
save(const Image<I>& ima, const std::string& filename)
{
mln_ch_value(I,bool) opacity_mask;
- save(ima, opacity_mask, filename);
+ save_options options;
+ save(ima, opacity_mask, options, filename);
+ }
+
+ template <typename I>
+ inline
+ void
+ save(const Image<I>& ima, const save_options& options,
+ const std::string& filename)
+ {
+ mln_ch_value(I,bool) opacity_mask;
+ save(ima, opacity_mask, options, filename);
}
+ template <typename I, typename J>
+ void
+ save(const Image<I>& ima, const Image<J>& opacity_mask,
+ const std::string& filename)
+ {
+ save_options options;
+ save(ima, opacity_mask, options, filename);
+ }
# endif // ! MLN_INCLUDE_ONLY
--
1.7.2.5
* mln/io/magick/save.hh: Add save_options structure.
---
milena/ChangeLog | 6 ++
milena/mln/io/magick/save.hh | 141 ++++++++++++++++++++++++++++++++++-------
2 files changed, 123 insertions(+), 24 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1e49435..775731e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2013-04-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add save options to magick::save.
+
+ * mln/io/magick/save.hh: Add save_options structure.
+
+2013-04-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add a new routine to get image headers thanks to GraphicsMagick.
* mln/io/magick/get_header.hh,
diff --git a/milena/mln/io/magick/save.hh b/milena/mln/io/magick/save.hh
index d8ca8a1..8437462 100644
--- a/milena/mln/io/magick/save.hh
+++ b/milena/mln/io/magick/save.hh
@@ -58,29 +58,71 @@ namespace mln
namespace magick
{
- /*! \brief Save a Milena image into a file using Magick++.
- \overload
+ /*!
+ \brief Store specific save options to use with Magick++.
+ \ingroup iomagick
+ */
+ struct save_options
+ {
+ save_options();
+
+ /*! \brief Define the compression algorithm.
+
+ By default it is set to Magick::NoCompression.
+ */
+ Magick::CompressionType compression_type;
+
+ /*! \brief Define the image type in output (RGB, Bilevel,...).
+
+ By default it is set to Magick::OptimizeType which will
+ decide automatically the best type according to image
+ characteristics.
+ */
+ Magick::ImageType image_type;
+ };
+
- \param[in] ima The image to save.
- \param[in] filename The name of the output file.
+ /*!
+ \brief Save a Milena image into a file using Magick++.
+ \overload
- \ingroup iomagick
+ \param[in] ima The image to save.
+ \param[in] filename The name of the output file.
+
+ \ingroup iomagick
*/
template <typename I>
void
save(const Image<I>& ima, const std::string& filename);
- /*! \brief Save a Milena image into a file using Magick++.
- \param[in] ima The image to save.
+ /*!
+ \brief Save a Milena image into a file using Magick++.
+ \overload
+
+ \param[in] ima The image to save.
+ \param[in] options Save options.
+ \param[in] filename The name of the output file.
+
+ \ingroup iomagick
+ */
+ template <typename I>
+ void
+ save(const Image<I>& ima, const save_options& options,
+ const std::string& filename);
+
+ /*!
+ \brief Save a Milena image into a file using Magick++.
+ \overload
- \param[in] opacity_mask Mask used to set pixel opacity_mask in output
- image. Output format must support this feature to be taken
- into account.
+ \param[in] ima The image to save.
+ \param[in] opacity_mask Mask used to set pixel opacity_mask in output
+ image. Output format must support this feature to be taken
+ into account.
- \param[in] filename The name of the output file.
+ \param[in] filename The name of the output file.
- \ingroup iomagick
+ \ingroup iomagick
*/
template <typename I, typename J>
void
@@ -88,20 +130,39 @@ namespace mln
const std::string& filename);
- // FIXME: Unfinished?
-#if 0
- /** Save a Milena tiled image into a file using Magick++.
+ /*!
+ \brief Save a Milena image into a file using Magick++.
- \param[out] ima The image to save.
- \param[in] filename The name of the output file. */
- template <typename T>
+ \param[in] ima The image to save.
+ \param[in] opacity_mask Mask used to set pixel opacity_mask in output
+ image. Output format must support this feature to be taken
+ into account.
+ \param[in] options Save options.
+ \param[in] filename The name of the output file.
+
+ \ingroup iomagick
+ */
+ template <typename I, typename J>
void
- save(const Image< tiled2d<T> >& ima, const std::string& filename);
-#endif
+ save(const Image<I>& ima, const Image<J>& opacity_mask,
+ const save_options& options, const std::string& filename);
# ifndef MLN_INCLUDE_ONLY
+ namespace internal
+ {
+
+ inline
+ void set_options(Magick::Image& magick_ima,
+ const save_options& options)
+ {
+ magick_ima.compressType(options.compression_type);
+ magick_ima.type(options.image_type);
+ }
+
+ } // end of mln::io::magick::internal
+
namespace impl
{
@@ -468,10 +529,22 @@ namespace mln
} // end of namespace mln::io::magick::internal
+ // save_options
+ inline
+ save_options::save_options()
+ : compression_type(Magick::NoCompression),
+ image_type(Magick::OptimizeType)
+ {
+ }
+
+
+
+ // Facades
+
template <typename I, typename J>
void
save(const Image<I>& ima_, const Image<J>& opacity_mask_,
- const std::string& filename)
+ const save_options& options, const std::string& filename)
{
mln_trace("mln::io::magick::save");
@@ -524,21 +597,41 @@ namespace mln
internal::paste_data_dispatch(ima, magick_ima);
}
+ // Take options into account.
+ internal::set_options(magick_ima, options);
+
magick_ima.write(filename);
}
-
-
template <typename I>
inline
void
save(const Image<I>& ima, const std::string& filename)
{
mln_ch_value(I,bool) opacity_mask;
- save(ima, opacity_mask, filename);
+ save_options options;
+ save(ima, opacity_mask, options, filename);
+ }
+
+ template <typename I>
+ inline
+ void
+ save(const Image<I>& ima, const save_options& options,
+ const std::string& filename)
+ {
+ mln_ch_value(I,bool) opacity_mask;
+ save(ima, opacity_mask, options, filename);
}
+ template <typename I, typename J>
+ void
+ save(const Image<I>& ima, const Image<J>& opacity_mask,
+ const std::string& filename)
+ {
+ save_options options;
+ save(ima, opacity_mask, options, filename);
+ }
# endif // ! MLN_INCLUDE_ONLY
--
1.7.2.5