Atalasoft
Welcome to Atalasoft Community Sign in | Join | Help

ResampleCommand - image size ignored?

  •  06 Aug 2007, 7:26 AM

    ResampleCommand - image size ignored?

    I've got a problem with the ResampleCommand. I want to scale my image (JPG) to another size (given by destWidth and destHeight) and save it, but the image keeps its original size. I've tried:

      workspace.Image = image;
      workspace.ApplyCommand(new ResampleCommand(new Size(destWidth, destHeight),
      ResampleMethod.LanczosFilter)); //resampleMethod
      workspace.Dispose();

     ...

      image.Save(infoDest.FullName, enc, null);

     

    The image is saved with the original size. Can anybody tell me how to get it to take destWidth & destHeight into account?

     

    Many thanks,
    r.

    Filed under: ,
View Complete Thread