Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.bpm to 1 bit image error #30

Open
Hr24612 opened this issue Mar 16, 2020 · 1 comment
Open

.bpm to 1 bit image error #30

Hr24612 opened this issue Mar 16, 2020 · 1 comment

Comments

@Hr24612
Copy link

Hr24612 commented Mar 16, 2020

Not sure why but I am not able to convert the following image to 1 bit BMP. I made sure both the old and new have the same dimensions 150x150 but I am not sure what is going on. Any help is appreciated. Thanks!
image

app.get('/', (req, res) =>
 {
	const bmpBuffer = fs.readFileSync('test3.bmp');
	//var Data = bmp.decode(bmpBuffer);
	const bmpData = {
		data: Data,
		bitPP: 1,
		width: 150,
		height: 150
	};

	const rawData = bmp.encode(bmpData);
	fs.writeFileSync('test/image.bmp', rawData.data);
});

@patryk-kawalarz
Copy link

Hello @Hr24612
Have you resolved your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants