edid-generator
v1.4.3
Published
This is a simple tool to generate EDID binary files.
Downloads
183
Readme
EDID Generator
This is a simple tool to generate EDID binary files.
Installation
npm install edid-generator
Usage
import {
createEdidData,
getPredefinedModesList,
} from 'edid-generator';
// Example 1 - Create EDID data with custom params
import { writeFileSync } from 'fs';
const params = {
horiz_pixels: 640,
vert_pixels: 1536,
refresh_rate: 60,
interlaced: false,
};
const result = createEdidData({
baseFileType: 'HDR',
type: 'custom',
customEdidParams: params,
withV3CSHeader: true,
yCbCr422: false,
yCbCr444: false,
});
writeFileSync(`./${result.fileName}`, result.data);
// Example 2 - Create EDID data with default params
const mode = getPredefinedModesList()[0]; // { name: '4K / 60', horiz_pixels: 3840, vert_pixels: 2160, refresh_rate: 60 }
const result2 = createEdidData({
baseFileType: 'HDR',
type: 'predefined',
predefinedMode: '3840x2160@60',
yCbCr422: false,
yCbCr444: false,
});
console.log(result2);
// Example 3 - Create EDID data with default params and V3CS header
const result3 = createEdidData({
baseFileType: 'HDR',
type: 'predefined',
predefinedMode: '3840x2160@60',
withV3CsHeader: true,
yCbCr422: false,
yCbCr444: false,
});
console.log(result3);