I have tried searching for a day for converting JPEG & PNG to RAW image format(*.raw format), but couldn't find any and all the result were RAW to JPEG/PNG. Finally i decided to ask here hoping will get the answer.
So, i want to convert images of format JPEG & PNG to RAW image format(*.raw) only and for that i need C++ library which can do this work. Also, if you can suggest some step by step process to achieve it using C++ will be helpful. As i don't have experience in this and not getting start up.
Please guide me for the same. Your help is highly appreciated.
Thanks
"Raw" is not a well defined format.
Depending on who you talk to, it could mean a manufacturer's proprietary unprocessed format, such as:
Almost no software supports writing such files. dcraw
and ufraw
support reading them.
Or it could mean straight RGB888 bytes with no header or size information. Many libraries support this:
libvips
can do itYou don't need to actually write any C/C++ to convert a JPEG/PNG to raw RGB bytes, you can just use ImageMagick in the commandline:
magick input.png -depth 8 RGB:result.raw