Convert image into useable byte array in C?

后端 未结 6 1011
半阙折子戏
半阙折子戏 2021-01-20 07:04

Does anyone know how to open an image, specifically a jpg, to a byte array in C or C++? Any form of help is appreciated.

Thanks!

6条回答
  •  無奈伤痛
    2021-01-20 07:43

    I have my students use netpbm to represent images because it comes with a handy C library, but you can also put images into text form, create them by hand, and so on. The nice thing here is that you can convert all sorts of images, not just JPEGs, into PBM format, using command-line tools the Unix way. The djpeg tool is available a number of places including the JPEG Club. Students with relatively little experience can write some fairly sophisticated programs using this format.

提交回复
热议问题