AnyBitmap에서 바이트 읽기
using IronSoftware.Drawing;
using System.IO;

// Get, export, and read bytes
AnyBitmap bitmap = AnyBitmap.FromFile(@"FILE_PATH");
byte[] bit = bitmap.GetBytes(); // Get
byte[] export = bitmap.ExportBytes(AnyBitmap.ImageFormat.Tiff, 10);  // Export
byte[] bat = File.ReadAllBytes("file_path"); // Read


NuGet 다운로드
PM > Install-Package IronSoftware.System.Drawing
AnyBitmap에서 바이트 읽기

AnyBitmap에서 바이트 읽기

AnyBitmap 파일 작업

사용자는 바이트 단위로 AnyBitmap 파일을 조작할 수 있습니다. IronDrawing 라이브러리는 AnyBitmap 파일의 바이트를 Get, Export, Read 메소드를 제공합니다.

읽을 이미지 파일은 AnyBitmap.FromFile(@"FILE_PATH") 파일 경로를 사용하여 로드하고 AnyBitmap 변수에 저장할 수 있습니다. 그 후 이 변수를 조작하여 .GetBytes() 메소드를 사용해 바이트를 얻고, .ExportBytes(AnyBitmap.ImageFormat.Format, 10) 메소드를 사용해 이미지 형식과 이미지 손실 정도를 변경할 수 있는 옵션으로 바이트를 내보내고, File.ReadAllBytes(@"FILE_PATH") 메소드를 사용하여 파일의 모든 바이트를 읽을 수 있습니다.

GitHub에서 보기

시작할 준비 되셨나요?

NuGet 다운로드 수 21,851,269버전:2026.11방금 출시