Attach videos or diagrams / ship plans and other documents

Robert Helling helling at
Thu Oct 15 06:41:20 PDT 2015

> On 15.10.2015, at 15:08, Tomaz Canabrava <tcanabrava at> wrote:
> Right now it's pictures only, but other things can be added for the next version. I'll try to think of a way for that.
> Tomaz


I just had a quick attempt to implement that but I have to admit, I don’t know enough C++ for this. Maybe you can help me out.

We have the class SHashedImage with is a pimped version of QImage defined in divepicturewidget.cpp

It gets a struct * picture as an argument and tries to load the image, first from the file name and if that fails from hash lookup.

My idea was to extend this such that when loading from a filename as a QImage fails (isNull() is true), we could try to load the file as a QMove and then extract a Image via

		QMovie film(QString(picture->filename));
		if (film.isValid()) {

(Maybe the first image is not ideal, we could seek forward a bit).

But how to I tell C++ to set the QImage inside SHashedImage to this? Going via loadFromData seems to be somewhat roundabout.

Can you help me?


Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the subsurface mailing list