Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to use C#,help
#2
Try this:
Macro Macro62
Code:
Copy      Help
str filename="c:\temp\flowers.jpg"  ;; replace with your test picture here

int width = 256  ;; change width size
int height = 256 ;; change height size

CsExec("" F"''{filename}'' {width} {height}")

#ret
using System;
using System.Drawing;

public class Test
{
,static void Main(string[] p)
,{
,,using (var image = Image.FromFile(p[0]))
,,{
,,,int width = int.Parse(p[1]);
,,,int height = int.Parse(p[2]);
,,,using (var thumbnail = image.GetThumbnailImage(width, height, null, IntPtr.Zero))
,,,{
,,,,thumbnail.Save(@"c:\temp\thumbnail.png");
,,,,System.Diagnostics.Process.Start(@"c:\temp\thumbnail.png");
,,,}
,,}
,}
}


Messages In This Thread
how to use C#,help - by tiger1973 - 05-15-2019, 09:33 AM
RE: how to use C#,help - by Start_Learning - 05-19-2019, 04:33 AM
RE: how to use C#,help - by tiger1973 - 05-23-2019, 02:39 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)