<PackageReference Include="System.Drawing.Common" Version="9.0.5" />

Image

An abstract base class that provides functionality for the Bitmap and Metafile descended classes.
using System.ComponentModel; using System.Drawing.Imaging; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.Serialization; namespace System.Drawing { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] [Editor("System.Drawing.Design.ImageEditor, System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [ImmutableObject(true)] [TypeConverter(typeof(ImageConverter))] public abstract class Image : MarshalByRefObject, ICloneable, IDisposable, ISerializable { [System.Runtime.CompilerServices.NullableContext(0)] public delegate bool GetThumbnailImageAbort (); [Browsable(false)] public int Flags { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } [Browsable(false)] public Guid[] FrameDimensionsList { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } [Browsable(false)] [DefaultValue(false)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public int Height { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } public float HorizontalResolution { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } [Browsable(false)] public ColorPalette Palette { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } public SizeF PhysicalDimension { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } public PixelFormat PixelFormat { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } [Browsable(false)] public int[] PropertyIdList { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } [Browsable(false)] public PropertyItem[] PropertyItems { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } public ImageFormat RawFormat { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } public Size Size { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } [System.Runtime.CompilerServices.Nullable(2)] [DefaultValue(null)] [Localizable(false)] public object Tag { [System.Runtime.CompilerServices.NullableContext(2)] get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } [System.Runtime.CompilerServices.NullableContext(2)] set { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } public float VerticalResolution { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } [Browsable(false)] [DefaultValue(false)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public int Width { get { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } internal Image() { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public object Clone() { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void Dispose() { } protected virtual void Dispose(bool disposing) { } ~Image() { } public static Image FromFile(string filename) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static Image FromFile(string filename, bool useEmbeddedColorManagement) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static Bitmap FromHbitmap(IntPtr hbitmap) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static Bitmap FromHbitmap(IntPtr hbitmap, IntPtr hpalette) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static Image FromStream(Stream stream) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static Image FromStream(Stream stream, bool useEmbeddedColorManagement) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static Image FromStream(Stream stream, bool useEmbeddedColorManagement, bool validateImageData) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public RectangleF GetBounds(ref GraphicsUnit pageUnit) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } [System.Runtime.CompilerServices.NullableContext(2)] public EncoderParameters GetEncoderParameterList(Guid encoder) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public int GetFrameCount(FrameDimension dimension) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static int GetPixelFormatSize(PixelFormat pixfmt) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } [System.Runtime.CompilerServices.NullableContext(2)] public PropertyItem GetPropertyItem(int propid) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public Image GetThumbnailImage(int thumbWidth, int thumbHeight, [System.Runtime.CompilerServices.Nullable(2)] GetThumbnailImageAbort callback, IntPtr callbackData) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static bool IsAlphaPixelFormat(PixelFormat pixfmt) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static bool IsCanonicalPixelFormat(PixelFormat pixfmt) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public static bool IsExtendedPixelFormat(PixelFormat pixfmt) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void RemovePropertyItem(int propid) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void RotateFlip(RotateFlipType rotateFlipType) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void Save(Stream stream, ImageCodecInfo encoder, [System.Runtime.CompilerServices.Nullable(2)] EncoderParameters encoderParams) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void Save(Stream stream, ImageFormat format) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void Save(string filename) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void Save(string filename, ImageCodecInfo encoder, [System.Runtime.CompilerServices.Nullable(2)] EncoderParameters encoderParams) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void Save(string filename, ImageFormat format) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void SaveAdd(Image image, [System.Runtime.CompilerServices.Nullable(2)] EncoderParameters encoderParams) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } [System.Runtime.CompilerServices.NullableContext(2)] public void SaveAdd(EncoderParameters encoderParams) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public int SelectActiveFrame(FrameDimension dimension, int frameIndex) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } public void SetPropertyItem(PropertyItem propitem) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } void ISerializable.GetObjectData(SerializationInfo si, StreamingContext context) { throw new PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } }