Answer the question
In order to leave comments, you need to log in
How to implement disassembly/assembly of a picture into a one-dimensional array?
Where can I get the implementation of disassembling (suitable for vb.net, c#, c++, etc.) an image into a one-dimensional array, as well as assembling an image from a similar array and saving it to a file?
Answer the question
In order to leave comments, you need to log in
There can be no disassembly / assembly, because the picture is a one-dimensional array, indexing in which occurs by two variables. image_data_ptr[x + y * width]
If your picture (array of pixels) has a different type, then simply cast it to char *
, for example:
char * _1d_image_data_ptr = (char *) image_data_ptr;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question