Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Trying to clip a raster

$
0
0
I managed to work it out. Here's how I did it if anyone is interested:
        Dim inImage As MagickImage = New MagickImage(inImagePath)
        Dim outImage As MagickImage = New MagickImage(Color.White, 1000, 1000)
        Dim outGeom As MagickGeometry
        Dim XStart as Integer = 0
        Dim YStart as Integer = 0
        Dim cellWidth as integer = 1000
        Dim cellHeight as integer = 1000
        outGeom= New MagickGeometry(New Rectangle(XStart, YStart, cellWidth, cellHeight))
        outImage.CopyPixels(inImage, outGeom, 0, 0)
        outImage.Write(outImagePath)

Viewing all articles
Browse latest Browse all 3693

Trending Articles