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

bmp_img_read need some verification for "Bits Per Pixel" and "Compression" #59

Open
DeqingSun opened this issue Aug 28, 2022 · 0 comments

Comments

@DeqingSun
Copy link

The current bmp_img_read function only supports 24 bit uncompressed BMP.

Some code like

if ((img->img_header.biBitCount != 24) || (img->img_header.biCompression != 0)){
		printf("format is not 24bit uncompressed\n");
		fclose (img_file);
		return BMP_ERROR;
	}

will be helpful to avoid errors and give user an idea about the error.

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

1 participant