Talk:The Incredible Machine image format

From ModdingWiki
Jump to: navigation, search

SCN compressing

I've been looking at reproducing the compression for SCN, but, my goodness, it's seriously advanced. It does weird stuff like predicting when it's more optimal to include more than the normal maximum of 4 pixels into a 'copy' (bits 11) command, when the extra pixel would compensate for an uneven amount anyway, filling up the empty nibble at the end of the range. I've experimented with doing a 5-pixel-allowing run, and if that results in an even amount, preferring that over a 4-pixel-allowing run, and so far, results of that method seem promising, but my results are still different from their, so I doubt that's how they actually did it.

So far, the saving method I designed seems to work for small images, but for large ones, I'm still missing something. As described in the article, when there are multiple empty lines in an image, and the image width warrants the use of double-byte line skip commands, the original files seem to pre-align their cursor to the X-coordinate where the data restarts below the gap. I'll probably have to implement that system to get it right.

-Nyerguds (talk) 01:08, 29 January 2021 (UTC)