jascamMigrationTest / WorkItemMigration

0 stars 0 forks source link

scale image #40

Closed jascam closed 6 years ago

jascam commented 6 years ago

static void Main(string[] args) { // 1. Create conversion options WpfDrawingSettings settings = new WpfDrawingSettings(); settings.IncludeRuntime = false; settings.TextAsGeometry = true;

        // 2. Select a file to be converted
        string svgTestFile = "Test.svg";

        // 3. Create a file converter
            StreamSvgConverter converter = new StreamSvgConverter(wpfSettings);

        // 4. Perform the conversion to XAML
         converter.EncoderType = ImageEncoderType.PngBitmap;

        if (converter.Convert(svgStream, memStream))
{
      memStream.Position = 0;
      File.Write(File(memStream, "image/png", "C:\\Temp\\myfile.png")
}

    }

is it possible to scale the image before i write the file using File.Write ?

This work item was migrated from CodePlex

CodePlex work item ID: '1720' Vote count: '1'

jascam commented 6 years ago

[SelormeyPaul@5/2/2014] Please check this post on how to implement it...

http://stackoverflow.com/questions/14387350/convert-drawingimage-to-bitmapimage

Paul.

jascam commented 6 years ago

[UnknownUser@5/2/2014]

jascam commented 6 years ago

Issue closed by SelormeyPaul with comment WPF issue, the solution is provided in a comment.