다음을 통해 공유


BrowserFileExtensions.RequestImageFileAsync 메서드

정의

현재 이미지 파일을 지정된 파일 형식 및 최대 파일 차원 중 하나로 변환하려고 시도합니다.

주의: 파일이 변환되거나 변환 전이나 후에 유효한 이미지 파일이 될 것이라는 보장은 없습니다. 변환은 .NET 코드로 전송되기 전에 브라우저 내에서 요청되므로 결과 데이터를 신뢰할 수 없는 것으로 처리해야 합니다.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::ValueTask<Microsoft::AspNetCore::Components::Forms::IBrowserFile ^> RequestImageFileAsync(Microsoft::AspNetCore::Components::Forms::IBrowserFile ^ browserFile, System::String ^ format, int maxWith, int maxHeight);
public static System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.Forms.IBrowserFile> RequestImageFileAsync (this Microsoft.AspNetCore.Components.Forms.IBrowserFile browserFile, string format, int maxWith, int maxHeight);
public static System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.Forms.IBrowserFile> RequestImageFileAsync (this Microsoft.AspNetCore.Components.Forms.IBrowserFile browserFile, string format, int maxWidth, int maxHeight);
static member RequestImageFileAsync : Microsoft.AspNetCore.Components.Forms.IBrowserFile * string * int * int -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.Forms.IBrowserFile>
static member RequestImageFileAsync : Microsoft.AspNetCore.Components.Forms.IBrowserFile * string * int * int -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.Forms.IBrowserFile>
<Extension()>
Public Function RequestImageFileAsync (browserFile As IBrowserFile, format As String, maxWith As Integer, maxHeight As Integer) As ValueTask(Of IBrowserFile)
<Extension()>
Public Function RequestImageFileAsync (browserFile As IBrowserFile, format As String, maxWidth As Integer, maxHeight As Integer) As ValueTask(Of IBrowserFile)

매개 변수

browserFile
IBrowserFile

IBrowserFile 새 이미지 파일로 변환할 입니다.

format
String

새 이미지 형식입니다.

maxWithmaxWidth
Int32

최대 이미지 너비입니다.

maxHeight
Int32

최대 이미지 높이

반환

ValueTask 작업 완료를 나타내는 입니다.

설명

이미지는 원래 가로 세로 비율을 유지하면서 지정된 차원에 맞게 크기가 조정됩니다.

적용 대상