Format:
Recent snippets matching tags of Image
<Image Margin="367.056,8,8,0" VerticalAlignment="Top" Name="imgLargePreview" Width="640" Height="480" MaxHeight="480" MaxWidth="640" /> Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click saveImage() End Sub Sub saveImage() Dim encoder = New PngBitmapEncoder()
14 Views
no comments
//UMBRACO 4.7// <!--Inserting Image using inline XSLT--> <umbraco:Item runat="server" field="mediaItem" xslt="concat('<img src="',umbraco.library:GetMedia({0}, true())/umbracoFile, '" />')" xsltDisableEscaping="true"/> <!--Getting item value from other node--> <umbraco:Item runat="server" Field="Title" NodeId="1282" /> <!--Getting the current page node (On backend)--> Node.GetCurrent().Id
95 Views
no comments
public class HandleTheme { // light public static string GetLightUrl(DependencyObject obj) { return (string)obj.GetValue(LightUrlProperty); } public static void SetLightUrl(DependencyObject obj, string value) { obj.SetValue(LightUrlProperty, value);
146 Views
no comments
public static BitmapImage _ToBitmapImage(this Bitmap bitmap) { var _MemoryStream = new MemoryStream(); bitmap.Save(_MemoryStream, ImageFormat.Png); var _BitmapImage = new BitmapImage(); _BitmapImage.BeginInit(); _BitmapImage.StreamSource = _MemoryStream; _BitmapImage.EndInit();
94 Views
no comments
Public Function generateGrayScaleImage(ByVal sourcePath As String, ByVal destinationPath As String) As Boolean Dim originalImage As Bitmap = Nothing Dim newBitmap As Bitmap = Nothing Dim g As Graphics = Nothing Dim success As Boolean = False If File.Exists(sourcePath) Then Try originalImage = Bitmap.FromFile(sourcePath) Catch ex As Exception
223 Views
no comments
<Border BorderBrush="Black" BorderThickness="1.5" CornerRadius="12"> <Border.Background> <ImageBrush> <ImageBrush.ImageSource> <BitmapImage UriSource="c:\temp\happy.jpg" /> </ImageBrush.ImageSource> </ImageBrush> </Border.Background> </Border>
267 Views
no comments
Rect rect = new Rect(canvas.RenderSize); RenderTargetBitmap rtb = new RenderTargetBitmap((int)rect.Right, (int)rect.Bottom, 96d, 96d, System.Windows.Media.PixelFormats.Default); rtb.Render(canvas); //endcode as PNG BitmapEncoder pngEncoder = new PngBitmapEncoder(); pngEncoder.Frames.Add(BitmapFrame.Create(rtb)); //save to memory stream System.IO.MemoryStream ms = new System.IO.MemoryStream();
203 Views
no comments
//სურათის ობიექტის კონვერტაცია ბაიტების მასივში. private byte[] ImageToByteArray(System.Drawing.Image imageIn) { MemoryStream ms = new MemoryStream(); imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Gif); return ms.ToArray(); } //სურათის ბაიტების მასივის კონვერტაცია სურათის ობიექტში private Image ByteArrayToImage(byte[] byteArrayIn) { MemoryStream ms = new MemoryStream(byteArrayIn);
406 Views
no comments
/*database name here*/ $database = ''; /*host name for MySQL*/ $hostname = 'localhost'; /*user name for MySQL*/ $username = ''; /*password for MySQL*/ $password = ''; //Get the h3fileid
245 Views
no comments
public static void ResizeImage() { using (Bitmap src = new Bitmap(_ImgOriginal)) { int destWidth = (int)(0.5 * src.Width); int destHeight = (int)(0.5 * src.Height); using (Bitmap dest = new Bitmap(destWidth, destHeight)) using (Graphics gDest = Graphics.FromImage(dest)) {
355 Views
no comments
#include <nds.h> #include <boost/cstdint.hpp> #include <boost/gil/algorithm.hpp> #include <boost/gil/image_view.hpp> #include <boost/gil/packed_pixel.hpp> #include <boost/gil/rgba.hpp> #include <boost/gil/virtual_locator.hpp> #include <boost/mpl/vector.hpp> #include <boost/utility/binary.hpp>
738 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
