Also, I'm wondering what does ^[[?33h do :P, did a quick search on the webz, but didn't find anything.
"?33h" presumably sets 80x25 color text mode. According to the ANSI standard I believe this should be represented as ?3h, but in all the sample .ans files I was given at the time, ?33h was used instead (no idea why xD), so I coded for that... I don't use .ans myself so I only implemented it based on the initial requests according to the resources I was provided and what I could look up :P
Seems to have worked out okay over the years so far.
Discord seems like an interesting use case :)
Though yeah not super compatible. It won't be able to properly display the full .ans output anyway because they don't account for the file header (as you can see there). This is what I got when I edited it out, having drawn in RP the same thing you did:
Though newlines are indeed a problem with different window widths.
there could be an option for hard wrapping
And how is that presumed to work? More specifically, what defines when and where we want to add these newlines? Basically just check backwards from the end of each line and force an early linefeed after the last space that contains anything (character or background color). Maybe possible.
Also we can see that Discord uses non-standard background colors, although I guess if you just modified REXPaint's palette to match the list they're using you'd end up WYSIWYG in that regard.
In the end unless there's more of a need for it, I'm not super interested in building something directly compatible with Discord right now, especially since their own support is relatively new and could change. (Mainly referring to, for example, automatically removing the header.)
I do hope to release a new REXPaint version perhaps next month, though.
files could be in arbitrary width rather than 80 cols only
Yeah it was just made to adhere to the standard size used so that it could be compatible with other software and the most frequent use cases.