[Kde-pim] Re: HTML-Mails and Pictures

Thomas McGuire mcguire at kde.org
Fri Nov 5 13:27:08 GMT 2010


Hi,

On Friday 05 November 2010 12:45:43 Armin Hassenpflug wrote:
> Writing an HTML-Mail I added three jpg-pictures à 22 KiB. After sending the
> mail, I was surprised about the hugh file size about ~ 800 KiB. I discovert
> kmail converts jpg to png files. The filesize of Picture-1 raised up to ~
> 70 KiB and Pictures-2+3 up to ~ 360 KiB. Why on earth does kmail converts
> the pictures and why kmail don't ask? I hate Application doing something
> in the background I don't want. I want to dictate whenever kmail converts
> a picture. By the way, I'm not sure, but I guess there is a lack of png
> support on prior MS Windows email Applications.
> Is there any way to prevent autoconvertion?

There is no way to turn off autoconvertion, sorry. What KMail does is that it 
loads the image into memory, so all loaded images are QImages in memory 
without a specific format, they are just bitmaps. Then, when KMail saves the 
message for sending, it simply converts from the in-memory format to PNG, 
without taking the original format into consideration. This could indeed be 
improved. Since this is a development mailinglist, someone who is interested 
can have a look at textedit.cpp in kdepimlibs/kpimtextedit, that is where the 
images are loaded from disk into the textedit.
The image is then converted to PNG in MainTextJobPrivate::createImageJob() in 
kdepim/messagecomposer/maintextjob.cpp.
Fixing this would be a nice junior job :)

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20101105/1f4f39fd/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list