ima-save.cc 309 Bytes
Newer Older
Guillaume Lazzara's avatar
Guillaume Lazzara committed
1
# include <mln/essential/2d.hh>
2
3
int main()
{
Guillaume Lazzara's avatar
Guillaume Lazzara committed
4
5
6
7
8
9
10
11
12
13
  using namespace mln;

  bool vals[5][5] = {
    {1, 0, 1, 0, 0},
    {0, 1, 0, 1, 0},
    {1, 0, 1, 0, 0},
    {0, 1, 0, 1, 0},
    {0, 1, 0, 1, 0}
  };
  image2d<bool> ima = make::image(vals);
14

Guillaume Lazzara's avatar
Guillaume Lazzara committed
15
  // \{
Guillaume Lazzara's avatar
Guillaume Lazzara committed
16
17
  io::pbm::save(ima, "../figures/ima_save.pbm");
  // \}
18
}