[Qt-interest] Stream-oriented image conversion

Paul Miller paul at fxtech.com
Wed Jun 23 22:38:22 CEST 2010


On 6/23/2010 3:27 PM, Jason H wrote:
> This seems like a no brainder, but I was wondering/hoping if someone could enlighten me.
>
> I need to convert very large images (usually just an array of bits, in various formats) to another format. These files are typically 80MB, but can go as high as 800MB+ and, adding to it, it is a multi-threaded environment, which means that I might have 10 or more images being converted at once.
>
> I was hoping with with Qt's QIODevice abstraction that I could set up some kind of streaming conversion where I can read 64k chunks and send them to a writer that will, when a tile is complete, process and write the tile in the new format. This way, with 10 thread on 80MB files, I only use 640k, rather than 800MB at a time, as 640k ought to be enough for anybody.

Qt's own image engine doesn't seem to support streamed image I/O. You'll 
probably need to roll your own somehow. In the past, I've done that 
myself, without using Qt classes.



More information about the Qt-interest-old mailing list