reset password
Author Message
ccasti26
Posts: 4
Posted 21:33 Jan 30, 2020 |

Do I have to look out for any white space characters in the raster data or do I just use the height and width data to know when to go to the next row of pixel data?

jungsoolim
Posts: 38
Posted 22:33 Jan 30, 2020 |
ccasti26 wrote:

Do I have to look out for any white space characters in the raster data or do I just use the height and width data to know when to go to the next row of pixel data?

You can use the application height and width data to determine the initial length of line. For example, you can set the initial length of line to be 1/3 of application scene height or width whichever smaller for order 0, For order 1, you will divide the initial length to half, For order 2, divide it to half again and so on.

ccasti26
Posts: 4
Posted 22:55 Jan 30, 2020 |

Thanks!

kknaur
Posts: 540
Posted 13:33 Jan 31, 2020 |

In the pixel data it is possible that there may be a white space character simply because the value of that color channel is the same as the ASCII value of the whitespace character and when the text editor tries to interpret the value it will appear as that character.  Disregard this.  The pixel data is stored in a linear sequence so just read byte by byte and let your loops that do the reading handle when to move to the next row of the array.