Socoder -> C/C++/C#/Other -> Rotate a 1bpp image?
|Fri, 21 Oct 2016, 15:23|
You've guessed it, I'm wanting to do something that I have no clue about, rotate an image without resorting to converting it to at least 8bpp first.
Picture this, I have an array of 84x48 pixels, reduced down to 1bpp, so that's 84x6 bytes. The problem is, it's intended to be sent to a nokia LCD, so the byte order is... different. The data goes top to bottom then left to right, so the first byte represents 0,0 to 0,7 then the second is 0,8 to 0,15 and so on, each column taking up 6 bytes.
However, I need to get it onto a screen that expects the data to be what we would call the 'right way around' so the first byte would be 0,0 to 7,0 then 7,0 to 15,0 and so on, each row taking up 11 bytes (yes I know, 84/8 is 10.5 so I'm expanding the width, I have to anyway).
My current stage is as follows -
Which outputs the image sideways to 'screen'.
How the hell do I rotate the bloody thing 90 degrees anti-clockwize?
Check out my excellent homepage!
|Fri, 21 Oct 2016, 18:53|
This any use?