c++ - Extracting the "n"th image out of a bmp (or other image type) -


i have bmp image that's comprised of 13 images, , each image 17x17. aside breaking image down through gimp 13 different images, way 'extract' nth image list (into char array, preferably) may use it? i've tried advancing pointer forward n*17*17 pixels, , aside fact ignores header, thought should work - unfortunately, doesn't.

suggestions?

note i've tagged c and c++ because i'm happy see/hear of solution in either language.

perhaps use existing tools tile cropping

convert paged.gif  +gravity -crop 32x32  tiles_%d.gif 

imagemagick comes api usable many language, including c, c++, php, perl, etc etc relevant function seem be

cropimagetotiles


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -