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

Attempting to save a BIN file of uneven width fails silently #14

Open
TheGreenHerring opened this issue Sep 27, 2023 · 0 comments
Open

Comments

@TheGreenHerring
Copy link

If you set the canvas to an uneven width (e.g. 79 instead of 80), and then attempt to save it as a BinaryText / BIN file, it properly fails: because video cards of the time only supported even image widths, the widely-accepted standard for BinaryText in the SAUCE specification encodes the width in the FileType field as half the intended width so as to maximize how wide an image can be using only a single byte (e.g. a width of 80 characters is stored as 40, and the maximum width is 255*2 = 510 characters).

The problem, however, is that it fails silently. While no file is ever saved, no error message is provided explaining this limitation to the user. This means it is possible for the user to create an image of an uneven width, try to save it as a BIN file, and then close the program without ever realizing their picture was never saved, losing all their work.

Moebius contains a warning dialog for saving to ANSI format¹ that informs the user in the event that they attempt to save an ANSI-format image with any of four control characters, and if the user chooses "OK", these characters will be replaced with equivalents that can be displayed. Because it is not possible to save uneven-width images in BIN format, the least one can do is display an error message when attempting to do so, explaining that it is not possible.

¹ For some reason, this is currently disabled by default, whereas in regular Moebius, it is not.

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