How to re-size .bmp file in C\C++?
Question
I am doing a CBIR system as an assignment.There are 100 .bmp files,but they have different size,how to re-size them to a same size? Thanks.
Solution
Have a look at the CImg Library, it's quite easy to use. You can load your bitmap file then use one of the resize
function.
OTHER TIPS
Probably a overkill, but you can take a look on ImageMagick.
You should look at G'MIC, a command-line tool to batch image processing operations. It is even more advanced than ImageMagick's convert tool.
Basically, you can call it like this :
gmic *.bmp -resize 128,128,1,3,3 -outputp resized_
to resize all your bmp images into 128x128 color images, and save them with filenames prefixed by 'resized_'.
G'MIC is available for Linux, Windows and Mac, at : http://gmic.sourceforge.net
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow