Archived

This topic is now archived and is closed to further replies.

RandomAxess

Creating a .raw file

Recommended Posts

RandomAxess    132
hey all, i wanted to create a .raw file, one that can be opened in Photoshop and observed. It has to be black and white...basically i''m looking into inputing a 2x2 array into the file, where each location is either black or white dot. Anyone know how to do this?

Share this post


Link to post
Share on other sites
_DarkWIng_    602
Just write array to binary file. Write 0 where you want black color and 255 (0xFF) where you want white color. And write just pure data. No LF/CR characters. Then if size of file is x^2 PhotoShop sould figure out the size itself.

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites