http://carclassifiedscheapads.com/?s=Jeep%20Cherokee


›› › [updates]

HOME
MY IP
WHOIS
ABOUT US

Site has moved
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.IO; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace WpfApplication1 { /// /// Логика взаимодействия для Window1.xaml /// public partial class Window1 : Window { public Window1() { InitializeComponent(); var files = new[] { @"c:\temp\1.jpg", @"c:\temp\2.jpg" }; System.Drawing.Image objImage = System.Drawing.Image.FromFile(@"c:\temp\1.jpg"); int width = objImage.Width; int height = objImage.Height; MessageBox.Show("Ширина - " + width.ToString() + " Длина - " + height.ToString()); var dv = new DrawingVisual(); using (var dc = dv.RenderOpen()) { double left = 0; foreach (var file in files) { var bi = new BitmapImage(new Uri(file, UriKind.Absolute)); dc.DrawImage(bi, new Rect(left, 0, bi.Width, bi.Height)); left += bi.Width; } } var rtb = new RenderTargetBitmap((int)dv.ContentBounds.Width, (int)dv.ContentBounds.Height, 96, 96, PixelFormats.Pbgra32); rtb.Render(dv); var en = new PngBitmapEncoder(); en.Frames.Add(BitmapFrame.Create(rtb)); using (var s = File.Create(@"C:\Temp\result.jpg")) en.Save(s); } } }