Canvas shrinked after converting to ANSI
I was working on a design concept on a 120 characters-wide canvas.
I decided to save the file in ANSI for better compatibility with other software.
I wasn't expecting it to overwrite the old file because of different extentions but it looks like they are the same type (binary).
When I open it that's what I see:
Opening with -W 120 doesn't help.
Hi there. Sorry you're having this issue.
I wasn't expecting it to overwrite the old file because of different extentions but it looks like they are the same type (binary).
If you run "file filename.ans" and it says it's a gzip file, then it's a .dur file. If it says it's ASCII text with escape codes, it's an ANSI. Durdraw is currently a little dumb about the file extensions. It leaves it up to you to specify the extension when saving, or if you just press enter when saving a .dur, it will use the last filename without modifying the extension.
When loading files, durdraw ignores the filename extension and just tries to figure it out.
Opening with -W 120 doesn't help.
Please try the 0.28.0-BETA build from https://github.com/cmang/durdraw/tree/dev and pass --wrap 120 (or a larger number). This is a new option to help address this issue.
--wrap WRAP Number of columns to wrap lines at when loading ASCII and ANSI files (default 80)
I admit, the -W and -H is confusing when loading ANSIs that are wider than 80 columns, and don't have the dimensions specified in a SAUCE record. The automatic 80 column wrapping in the ANSI loader is in place for compatibility with classic DOS ANSI files. I am working on improving this situation.
Let me know if this helps. Thanks for the report!
Also, I recommend making sure you have a .dur file saved as a master file format, and think of .ans as more of an export format. It's just a little safer that way, as the ANSI loader tries to account for a wide variety of "quirks" in different ANSI file formats, and (as you experienced) doesn't always succed 100%.
Thanks, it works! Although the vertical size is now too huge
BTW, are only 8 colors available for the background?
Edit: And is there a way to copy and paste text to another program?
BTW, are only 8 colors available for the background?
For now.. that's the way most/traditional ANSI terminals worked until kind of recently. I'm working on bringing more BG colors to a future version. At least 16 colors (and iCE color file support) would be nice.
Edit: And is there a way to copy and paste text to another program?
I've been meaning to add a "Mouse On/Off" toggle in the settings, to make this easier. I'll work on this soon. Some terminals let you mouse select through a menu option.
As for the vertical size... it's certainly a bug in the ANSI loader. It's probably optimized a bit more for loading ANSI files made in other editors than loading its own exports, I'm afraid., as silly as that sounds.
Until it's fixed, if you want to work your .ANS file back and forth between Durdraw and another ANSI editor without the extra lines, here is a possible way to do it:
1: Save your ANSI file in Durdraw. 2: Load it into another editor that can save SAUCE records. 3: Save it as an ANSI file with with a SAUCE record, which should specify the width/height in the record. 4: When you load the ANS file back into durdraw, it should load it with the correct dimensions (without the need for --wrap).
Edit: And is there a way to copy and paste text to another program?
For now, you can use the --nomouse option to disable the mouse on startup, and then copy text from durdraw.
Going to close this issue as the original issue is resolved with --wrap, and the second issue is resolved with --nowrap.
The ANSI loader still gets the dimension wrong sometimes...
If you're going to edit and save, then re-load art in Durdraw, I recommend using the .dur file format.