How to read an image to put an array?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Posts: 29
Joined: 2015-10-20T07:29:42-07:00
Authentication code: 1151

How to read an image to put an array?

Post by 2049651 » 2015-10-26T22:03:27-07:00


I don't know where to start from.
I want to read image by imagemagick into array."c:aaa.jpg"); at this point, there is no error.

I want to put to arrary what I had already read image data.
And I want to write file by using imagemagick library.
Here is my code.


Image my_image("640x480", "white");
Pixels my_pixel_cache(my_image);
PixelPacket* pixels;
int start_x = 0, start_y = 0, size_x = 640, size_y = 480;
*pixels = Color("black");
*(pixels+200) = Color("green");


But I can't get array of a.jpg. How to get a.jpg image data to array to modify?

Post Reply