I am currently working on a c# open source photo mosaic software (Sourceforge Link). This software stitches together large amounts of small photos (tiles) into one big image.
Since the final image size is usually in the order of 20k px times 15k px, I am only saving a map of how to arrange the tiles in memory. To construct the final image, I am constructing it in parts, namely in band of 8 lines (can by any other number, too).
In the case of bmps, this data can then easily saved chunk by chunk by first writing a bmp header and subsequently appending the ARGB data to this file.
But the resulting bmps are far too big for further handling (e.g. giving them to some poster printing company). I would therefore like to save these big images as jpgs on my hdd.
The problem is now, that since jpgs are compressed, writing the data in chunks seems very tricky (the normal Bitmap.Save() function will load the full image into memory first and is therefore not applicable), since writing pure, uncompressed RGB data won't do it.
The basic functionality of writing jpgs in party should exist, since as far as I know the compression algorithm of jpg works with chunks or 8x8 px.
I looked into several image libraries (FreeImage, GraphicsMagick, LibTiff.NET) to find solutions for this problem, but could not find any. LibTiff basically has the desired functionality, but only for the tiff image format.
Thanks a lot for your help! Max