51 references to ImageFormat
Microsoft.Maui.Graphics (24)
IImage.cs (4)
21 void Save(Stream stream, ImageFormat format = ImageFormat.Png, float quality = 1); 22 Task SaveAsync(Stream stream, ImageFormat format = ImageFormat.Png, float quality = 1);
IImageLoadingService.cs (2)
7 IImage FromStream(Stream stream, ImageFormat format = ImageFormat.Png);
ImageExtensions.cs (8)
9 public static byte[] AsBytes(this IImage target, ImageFormat format = ImageFormat.Png, float quality = 1) 21 public static Stream AsStream(this IImage target, ImageFormat format = ImageFormat.Png, float quality = 1) 33 public static async Task<byte[]> AsBytesAsync(this IImage target, ImageFormat format = ImageFormat.Png, float quality = 1) 45 public static string AsBase64(this IImage target, ImageFormat format = ImageFormat.Png, float quality = 1)
PlatformImage.cs (10)
13 private readonly ImageFormat _originalFormat; 15 public PlatformImage(byte[] bytes, ImageFormat originalFormat = ImageFormat.Png) 20 if (originalFormat == ImageFormat.Jpeg) 56 public void Save(Stream stream, ImageFormat format = ImageFormat.Png, float quality = 1) 72 public Task SaveAsync(Stream stream, ImageFormat format = ImageFormat.Png, float quality = 1) 177 public static IImage FromStream(Stream stream, ImageFormat format = ImageFormat.Png)
Microsoft.Maui.Graphics.Skia (14)
SkiaImage.cs (12)
101 public void Save(Stream stream, ImageFormat format = ImageFormat.Png, float quality = 1) 111 public async Task SaveAsync(Stream stream, ImageFormat format = ImageFormat.Png, float quality = 1) 120 private Stream GetSkStream(ImageFormat format, float quality) 130 ImageFormat.Png => SKEncodedImageFormat.Png, 131 ImageFormat.Jpeg => SKEncodedImageFormat.Jpeg, 132 ImageFormat.Bmp or ImageFormat.Gif or ImageFormat.Tiff => throw new PlatformNotSupportedException($"Skia does not support {format} format."), 157 public static IImage FromStream(Stream stream, ImageFormat formatHint = ImageFormat.Png)
SkiaImageLoadingService.cs (2)
7 public IImage FromStream(Stream stream, ImageFormat formatHint = ImageFormat.Png)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (13)
src\Graphics\src\Graphics\Platforms\Windows\PlatformImage.cs (11)
102 /// <para>Only <see cref="ImageFormat.Png"/> and <see cref="ImageFormat.Jpeg"/> are supported on this platform.</para> 103 /// <para>Setting <paramref name="quality"/> is only supported for images with <see cref="ImageFormat.Jpeg"/>.</para> 105 public void Save(Stream stream, ImageFormat format = ImageFormat.Png, float quality = 1) 112 case ImageFormat.Jpeg: 122 public async Task SaveAsync(Stream stream, ImageFormat format = ImageFormat.Png, float quality = 1) 129 case ImageFormat.Jpeg: 157 public static IImage FromStream(Stream stream, ImageFormat format = ImageFormat.Png)
src\Graphics\src\Graphics\Platforms\Windows\PlatformImageLoadingService.cs (2)
22 public IImage FromStream(Stream stream, ImageFormat formatHint = ImageFormat.Png)