Skip to content
Snippets Groups Projects
Commit 4280408d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Throw an error if trying to convert a > 1-bit BMP file to XBin

parent 304f7293
Branches
Tags
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2853 passed
// $Id: xbimage.js,v 1.6 2020/04/19 19:52:31 rswindell Exp $
// Utility module for creating and displaying XBin image files.
load('sbbsdefs.js');
......@@ -34,6 +32,11 @@ function convert_from_bmp(filename, charheight, fg_color, bg_color, palette, inv
return false;
}
if(bmp.infoheader.biBitCount != 1) {
alert(format("Bit-count (%d) must be 1 (monochrome)", bmp.infoheader.biBitCount));
return false;
}
// Add SAUCE
var sauce = {
title: title ? title : filename
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment