O
O
ogeolime2016-01-09 05:10:46
Arrays
ogeolime, 2016-01-09 05:10:46

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

2 answer(s)
N
nirvimel, 2016-01-09
@nirvimel

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;

X
xmoonlight, 2016-01-09
@xmoonlight

www.cyberforum.ru/cpp-builder/thread1162997.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question