Reinterpret cast the image content.
For example if you want to consider a RGBA8 image to be uint8, but with a 4x larger width.
This doesn't allocates new data storage.
Warning: This fails if the cast is impossible, for example casting a uint8 image to RGBA8 only
works if the width is a multiple of 4.
So it is a bit like casting slices in D.
TODO: castTo breaks layout constraints, what to do with them?
Tags: #valid.
Reinterpret cast the image content. For example if you want to consider a RGBA8 image to be uint8, but with a 4x larger width. This doesn't allocates new data storage.
Warning: This fails if the cast is impossible, for example casting a uint8 image to RGBA8 only works if the width is a multiple of 4.
So it is a bit like casting slices in D. TODO: castTo breaks layout constraints, what to do with them? Tags: #valid.