You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Read image from fileusing(MagickImageimage=newMagickImage("Snakeware.png")){// Tells the dds coder to use dxt1 compression when writing the imageimage.Settings.SetDefine(MagickFormat.Dds,"compression","dxt1");// Write the imageimage.Write("Snakeware.dds");}
VB.NET
' Read image from fileUsingimageAsNewMagickImage(SampleFiles.SnakewarePng)' Tells the dds coder to use dxt1 compression when writing the imageimage.Settings.SetDefine(MagickFormat.Dds,"compression","dxt1")' Save image as dds fileimage.Write("Snakeware.dds")EndUsing
Defines that need to be set before reading an image
C#
MagickReadSettingssettings=newMagickReadSettings();// Set define that tells the jpeg coder that the output image will be 32x32settings.SetDefine(MagickFormat.Jpeg,"size","32x32");// Read image from fileusing(MagickImageimage=newMagickImage("Snakeware.jpg")){// Create thumnail that is 32 pixels wide and 32 pixels highimage.Thumbnail(32,32);// Save image as tiffimage.Write("Snakeware.tiff");}
VB.NET
DimsettingsAsNewMagickReadSettings()' Set define that tells the jpeg coder that the output image will be 32x32settings.SetDefine(MagickFormat.Jpeg,"size","32x32")' Read image from fileUsingimageAsNewMagickImage("Snakeware.jpg")' Create thumnail that is 32 pixels wide and 32 pixels highimage.Thumbnail(32,32)' Save image as tiffimage.Write("Snakeware.tiff")EndUsing