Page 1 of 1

Resize large image

Posted: 2010-05-04T09:04:47-07:00
by soho
Hi All,
I create a large image (~4GB raw rgb) into memory mapped file, and need to resize it a little smaller (~99%) in horizontal direction only.

For now, I read a single scanline from the memory mapped file, and scale down, then put the result back to the mmap file.

It is faster than read/write from/to a file directly (with pread() and pwrite()), but still slow. I think it is faster if I can crop a small rectangular region rather than a single line.

However, how do I stitch these small regions together without seams after resize them?
Thanks.