Loading non-ascii data. possible?


I’ve got a bit of code that creates a dot-image from a monochrome picture. I have the image file saved in .raw format (hex, 1 byte per pixel), and thusly, the file is simply hex FF’s and 00’s. I’ve tried importing it anyway, and got about 10 null chars in return (file contains hundreds).

The way I’ve done it previously was to load the file into a hex editor, and convert the FF’s (white) to 30’s (ASCII 0) and the 00’s (black) to 31’s (ASCII 1).

Then I load the text file in and get a huge string of 1’s and 0’s, which I can then dice and slice to make my arrays. This is not awfully bad, but it is time consuming, and prone to keyboard error.

So is there anyway to cut out that nonsense with the text editor, and bring the hex data straight into flash, for further processing?

Here’s an example, to show how many 1’s and 0’s we’re talking about - dotlogo

Thanks :slight_smile: