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

New Post: .Resize is not working, not sure why

$
0
0
I want to save the master, then an 600x600, then a 600x600 with Watermark, then a thumbnail of the image object. They are all saved master size. Watermark works.
                //SAVE UNTOUCHED MASTER
                image.Write(Server.MapPath(MasterPath));

                //SAVE USEABLE DOWNLOAD WITHOUT WATERMARK
                MagickGeometry usize = new MagickGeometry(600, 600);        
               image.Resize(usize.X,usize.Y);
               image.Write(Server.MapPath(model.ImagePath));

                 //SAVE USEABLE DOWNLOAD WITH WATERMARK
                //WATERMARK
                new Drawables()
                  // Draw watermark on the image
                  .FontPointSize(72)
                  .Font("Candice")
                  .FillColor(new MagickColor("white"))
                   .FillOpacity(new Percentage(50))
                  .TextAlignment(TextAlignment.Center)
                  .Text(256, 240, "SurfJohn.com")
                  //PLACE WATERMARK
                  .Draw(image);

                image.Write(Server.MapPath(WaterMarkedPath));

                //FINALLY SAVE THUMBNAIL
                MagickGeometry size = new MagickGeometry(200, 200);
                image.Thumbnail(size.X, size.Y);

                image.Write(Server.MapPath(model.ThumbPath));

Viewing all articles
Browse latest Browse all 3693

Trending Articles