This project has moved. For the latest updates, please go here.

.Resize is not working, not sure why

Mar 26 at 4:24 AM
Edited Mar 26 at 6:26 AM
I want to save the master, then an 600x600, then a 600x600 with Watermark, then a thumbnail of the image object. Instead, they are all saved master size. Watermark works.
                //SAVE UNTOUCHED MASTER

                MagickGeometry usize = new MagickGeometry(600, 600);        

                new Drawables()
                  // Draw watermark on the image
                  .FillColor(new MagickColor("white"))
                   .FillOpacity(new Percentage(50))
                  .Text(256, 240, "")
                  //PLACE WATERMARK


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

Mar 26 at 5:55 AM
If you want to create a thumbnail of the original image you should create a "Clone" before you resize it.
Mar 26 at 6:25 AM
Thank you. I will look into that. What I am doing is saving first the Master, then resizing it and saving, then adding watermark and saving, and then resizing into thumbnail size. I don't think that cloning it will matter because I am saving it after I've saved the bigger copies, no?

I did find why I couldn't resize the image in the 2 places: I was using image.Resize((size.X, size.Y) when I should have used the size object alone: .Resize(size).
Works like I want (for now haha).

Am I losing quality by resizing it 2 times? once for 600x600 and once for thumbnail? If so, then clone sounds like the way to go.

Thank you very much dlemstra.
Mar 26 at 6:29 AM
What is the best practice in your opinion?
Save 4 versions, Master, 600x600 to buy, 600x600 with watermark to view, and thumbnail for initial display.


Save just the master picture and then generate the 3 other versions on demand?
Mar 26 at 8:24 AM
The best practice depends on your situation/application. My first thought would be on demand with the Magick.NET module but that might not work in your situation. Might be easier to just always create those images.