@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
47 lines (44 loc) • 1.32 kB
JavaScript
import koffi from 'koffi';
import { DWORD, LONG, WORD } from './win32.js';
class BitmapInfoHeader {
biSize;
biWidth;
biHeight;
biPlanes;
biBitCount;
biCompression;
biSizeImage;
biXPelsPerMeter;
biYPelsPerMeter;
biClrUsed;
biClrImportant;
constructor(options) {
this.biSize = koffi.sizeof(BITMAPINFOHEADER);
this.biWidth = options.biWidth;
this.biHeight = options.biHeight;
this.biPlanes = options.biPlanes;
this.biBitCount = options.biBitCount;
this.biCompression = options.biCompression;
this.biSizeImage = options.biSizeImage;
this.biXPelsPerMeter = options.biXPelsPerMeter;
this.biYPelsPerMeter = options.biYPelsPerMeter;
this.biClrUsed = options.biClrUsed;
this.biClrImportant = options.biClrImportant;
}
}
const BITMAPINFOHEADER = koffi.struct('BITMAPINFOHEADER', {
biSize: DWORD,
biWidth: LONG,
biHeight: LONG,
biPlanes: WORD,
biBitCount: WORD,
biCompression: DWORD,
biSizeImage: DWORD,
biXPelsPerMeter: LONG,
biYPelsPerMeter: LONG,
biClrUsed: DWORD,
biClrImportant: DWORD,
});
koffi.pointer('LPBITMAPINFOHEADER', BITMAPINFOHEADER);
export { BITMAPINFOHEADER, BitmapInfoHeader };
//# sourceMappingURL=bitmap-info-header.js.map