Milena (Olena)  User documentation 2.0a Id
Load and save images

After this step you should know how to:

  • load an image,
  • save an image.







Currently, Olena supports the following input image formats:

  • PBM
  • PFM
  • PGM
  • PNM
  • PPM

This support is provided through two headers for each type, save.hh and load.hh. They are located in mln/io/<image-format>/.

Once the right header is included, the image can be loaded:

  image2d<bool> ima;
  io::pbm::load(ima, MLN_DOC_DIR "/img/small.pbm");

If you wan to save an image, simply call the save routine in the proper namespace:

  io::pbm::save(ima, MLN_DOC_DIR "/figures/ima_save.pbm");

According to the image value type, the proper file format must be chosen. The supported file formats and their associated image value types are listed in section Load and save images .







←— Go to Data representation     |     Go to Create your first image   —→

 All Classes Namespaces Functions Variables Typedefs Enumerator