title: How to Create image tiles with Magick.NET or GraphicsMagick.NET
body: <p>I am using ImageMagick on the CLI like this:</p>
  
  <pre><code>gm convert input.png -crop 512x512 +repage +adjoin "tiles/tile%02d.png"
  </code></pre>
  
  <p>to create a tiled version of my input image. But i want to do it with GraphicsMagick.NET or Magick.NET instead of using the command line. The problem that occurred to me is that neither GM.NET or IM.NET seem to support "+repage" and "+adjoin" properly. Instead both generate only a single output image.</p>
  
  <p>I tried the following code in C# but without success.</p>
  
  <p>GraphicsMagick.NET Test</p>
  
  <pre><code>MagickImage image = new MagickImage("test.png");
  MagickGeometry geo = new MagickGeometry(512,512);
  
  image.Crop(geo);
  image.RePage();
  image.Adjoin = true; // i tried false too! 
  image.Write("testout_%d.png");
  </code></pre>
  
  <p>ImageMagick.NET Test</p>
  
  <pre><code>// ImageMagick.NET Test
  using (MagickImage image = new MagickImage("test.png"))
  {
     image.Crop(512, 512,Gravity.Northwest);
     image.RePage();
     image.Adjoin = true;
     image.Write("testout_%d.png");
  }
  </code></pre>
  
  <p>I also tried out MSL to generate a tiled version of my image, but MSL does not seem to support this either, both adjoin and repage are missing in MSL completely.</p>