png_read_infofor png images and in
jpeg_read_headerfor libjpeg. This seemed to be rather odd I thought, as there seemed to be a lot of applications using these libraries for image i/o. But as I found out, most don't use our dll but instead a static version of it. That wasn't an option for me though.
To understand the crashes a bit more I found a good explanation here. Basically the problem is that msvc will link to different runtime environments (our libpng/libjpeg dll against msvcrt and our digikam binaries against msvcr80) and each of those runtimes has a different idea of what a FILE pointer is. When trying to actually do something with your FILE pointer, you will get the crash.
The solution to the png problem I found in a french forum, I did what they said and now it works (diff). The solution to the jpeg problem is a bit harder as it requires some rewrite/addition. You might have to replace my QByteArray with whatever you use to store the complete file content but essentially it is everywhere the same (changes): I got it from here.