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
/// <param name="span">A Byte Span of image data in any common format.</param>
475
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// <param name="bytes">A ByteArray of image data in any common format.</param>
494
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// Create a new Bitmap from a <see cref="Stream"/> (bytes).
514
+
/// </summary>
515
+
/// <param name="stream">A <see cref="Stream"/> of image data in any common format.</param>
516
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// Create a new Bitmap from a <see cref="Stream"/> (bytes).
537
+
/// </summary>
538
+
/// <param name="stream">A <see cref="Stream"/> of image data in any common format.</param>
539
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// Construct a new Bitmap from binary data (byte span).
559
+
/// </summary>
560
+
/// <param name="span">A byte span of image data in any common format.</param>
561
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// Construct a new Bitmap from binary data (bytes).
524
570
/// </summary>
525
571
/// <param name="bytes">A ByteArray of image data in any common format.</param>
526
-
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.
527
-
/// Default is true. Set to false to load as Rgba32.</param>
528
-
/// <seealso cref="FromBytes"/>
572
+
/// <seealso cref="FromBytes(byte[])"/>
573
+
/// <seealso cref="AnyBitmap"/>
574
+
publicAnyBitmap(byte[]bytes)
575
+
{
576
+
LoadImage(bytes,true);
577
+
}
578
+
579
+
/// <summary>
580
+
/// Construct a new Bitmap from binary data (bytes).
581
+
/// </summary>
582
+
/// <param name="bytes">A ByteArray of image data in any common format.</param>
583
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// Construct a new Bitmap from a <see cref="Stream"/> (bytes).
537
593
/// </summary>
538
594
/// <param name="stream">A <see cref="Stream"/> of image data in any common format.</param>
539
-
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.
540
-
/// Default is true. Set to false to load as Rgba32.</param>
595
+
/// <seealso cref="FromStream(Stream, bool)"/>
596
+
/// <seealso cref="AnyBitmap"/>
597
+
publicAnyBitmap(MemoryStreamstream)
598
+
{
599
+
LoadImage(stream.ToArray(),true);
600
+
}
601
+
602
+
/// <summary>
603
+
/// Construct a new Bitmap from a <see cref="Stream"/> (bytes).
604
+
/// </summary>
605
+
/// <param name="stream">A <see cref="Stream"/> of image data in any common format.</param>
606
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// Construct a new Bitmap from a <see cref="Stream"/> (bytes).
627
+
/// </summary>
628
+
/// <param name="stream">A <see cref="Stream"/> of image data in any common format.</param>
629
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
thrownewNotSupportedException("Error while loading AnyBitmap from Uri",e);
688
+
}
689
+
}
690
+
691
+
/// <summary>
692
+
/// Construct a new Bitmap from a Uri
693
+
/// </summary>
694
+
/// <param name="uri">The uri of the image.</param>
695
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
thrownewNotSupportedException("Error while loading AnyBitmap from Uri",e);
777
+
}
778
+
}
779
+
780
+
/// <summary>
781
+
/// Construct a new Bitmap from a Uri
782
+
/// </summary>
783
+
/// <param name="uri">The uri of the image.</param>
784
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
/// <param name="uri">The uri of the image.</param>
829
+
/// <param name="preserveOriginalFormat">Determine whether to load <see cref="SixLabors.ImageSharp.Image"/> as its original pixel format or Rgba32.</param>
830
+
/// <returns></returns>
831
+
/// <seealso cref="AnyBitmap"/>
832
+
/// <seealso cref="FromUriAsync(Uri, bool)"/>
833
+
#if NET6_0_OR_GREATER
834
+
[Obsolete("FromUri(Uri) is obsolete for net60 or greater because it uses WebClient which is obsolete. Consider using FromUriAsync(Uri) method.")]
0 commit comments