Best C++ Library to Display an Image from a 2D Array -
i have 2d array contains image transferred binary file. display image , wondering best tool (c++ library) this.
simply, c++ library can take 2d array , display image?
edit* think best more specific.
i trying take 2d array of 8-bit numeric values , index them sort of structure display image.
matlab has function called imshow(x, map) map n 3 array of rgb values. x 2d array. there similar function provided c++ library.
thanks help.
is requirement of within c++, or ok extend toolchain? sounds combine c++ e.g. gnuplot this, results , little effort.
what you'd in case take 2d array of numbers , print them (their string representation, not bit representation) stdout, 1 pixel row per line, pixels separated spaces (or tabs). run program , redirect output file:
$ ./yourprogram > img.dat then, create gnuplot script plots image want. gnuplot has extensive documentation started - if download pdf current version (4.6) , under heading "image" (on page 53), seems precisely want.
my main argument approach on e.g. opengl really easy. writing stdout among first things c++ programmer learns, , gnuplot designed make plotting data easy. admittedly, gnuplot have steep-ish learning curve, not far steep producing of same quality opengl.
Comments
Post a Comment