I am currently working on C # open source mosaic software ( Sourceforge Link ). This software combines a large number of small photos (tiles) into one large image.
Since the final image size is usually around 20k px times 15k px, I only save a map of how to arrange the tiles in memory. To build the final image, I create it in parts, namely in a strip of 8 lines (maybe also any other number).
In the case of bmps, this data can then be easily saved using a chunk by first writing the bmp header and subsequently adding ARGB data to this file.
But the resulting bmps are too large for further processing (for example, give them to some poster company). Therefore, I would like to save these large images as jpg on my hdd.
The problem is that since jpgs are compressed, writing data in chunks seems very complicated (the usual Bitmap.Save () function first loads the full image into memory and therefore not applicable), since it is written clean, uncompressed RGB data will not do this.
The basic functionality for writing jpg in a batch must exist, because as far as I know, the jpg compression algorithm works with pieces or 8x8 px.
I searched several image libraries (FreeImage, GraphicsMagick, LibTiff.NET) to find solutions for this problem, but could not find them. LibTiff basically has the desired functionality, but only for the tiff image format.
Many thanks for your help! Max
source share