01/10/2018, 00:08
Read a bitmap image into 2D aray
mình là một người mới bắt đầu làm quen với lập trình. Mình có một file ảnh grayscale bitmap, mình uốn đọc file này và chuyển sang một array với các giá trị pixel 0 là mầu trắng, 1 là mầu đen tương ứng.
ai giúp mình cách làm với.
cảm ơn nhiều
Bài liên quan
Bạn có thể tìm hiểu cấu trúc file bitmap. trên ưiki
en.wikipedia.org
BMP file format
The BMP file format, also known as bitmap image file or device independent bitmap (DIB) file format or simply a bitmap, is a raster graphics image file format used to store bitmap digital images, independently of the display device (such as a graphics adapter), especially on Microsoft Windows and OS/2 operating systems. The BMP file format is capable of storing two-dimensional digital images both monochrome and color, in various color depths, and optionally with data compression, alpha channels,...
Hoặc các nguồn khác
http://www.digitalpreservation.gov/formats/fdd/fdd000189.shtml
http://paulbourke.net/dataformats/bitmaps/
Sau đó dọc các file nhị phân như bình thường.
Chúc bạn thành công.