N
N
Nikita2022-03-13 21:11:55
C++ / C#
Nikita, 2022-03-13 21:11:55

How to load JPG file into pixel array using libjpeg library (C++)?

I have a jpg file with a resolution of x by y pixels. There is also a vector std::vector<int>of size in xy . You need to write a function that will load a jpg file into this vector. Tried to google on this topic - found nothing. Thanks in advance.

PS If anyone has a solution that works through another library, then it will be great too. The main thing is that the solution should be cross-platform (at least run on Windows and Linux ), and also work with all versions of jpg (at least the latest ones).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2022-03-19
@gth-other

Understood. I used Magick++ library.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question