Bug 63664 - Filters for attachments to display inline. E.g. blacklist huge images
Summary: Filters for attachments to display inline. E.g. blacklist huge images
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kmail
Classification: Applications
Component: filtering (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-03 13:40 UTC by Nicolas Bock
Modified: 2012-08-19 01:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test image (10,000 x 10,000 pixels large) (381.65 KB, image/jpeg)
2003-09-03 13:41 UTC, Nicolas Bock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bock 2003-09-03 13:40:47 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    RedHat RPMs

Very large images (that is to say, images that are large in terms of pixels, not necessarily filesize) make kmail allocate tons of memory when View/Attachments/Inline is turned on. I suppose this could be viewed as a possibility of a denial of service since the system then will swap like crazy and possibly kill kmail or other apps (OOM killer). I will attach a jpg to this report that is just a plain white image but 10,000 x 10,000 pixels large.

A possible solution to this would be kmail trying to scale the image before displaying it, into some predefined (or maybe even user defined) scale size.
Comment 1 Nicolas Bock 2003-09-03 13:41:54 UTC
Created attachment 2362 [details]
Test image (10,000 x 10,000 pixels large)
Comment 2 Stephan Kulow 2003-09-03 14:33:02 UTC
well, to scale the image it still needs to be loaded. It's not just the displaying - even though 
that part sucks most memory (especially in the X server) 
Comment 3 Nicolas Bock 2003-09-03 15:04:29 UTC
Subject: Re:  very large images with View/Attachments/Inline makes kmail allocate huge amounts of memory

Isn't it possible to load the image (which in this case is only 300KB large) 
and check its resolution before allocating display space with X? The 
rescaling could be done more memory efficient, i.e. one doesn't have to look 
at the whole image in order to rescale. I understand though what you mean, 
this could get a little complicated.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/Vea9f1nNyq3gDhkRAkpSAJ4nBBgDj+llHqMgzJFkW+tN/VNf+ACdF+dS
PkJX4lBU1nVlqFRfx8644L4=
=GpH3
-----END PGP SIGNATURE-----

Comment 4 disclosed 2003-09-10 10:09:24 UTC
suggestion for improvemt for kmail. this especialy would make the
view->attachments->smart work better.

in the preferences there should be an option where one can descide what type of
attachemnts should be displayed inline.
a filter like option for this would be nice.
filer on the attachemnts: filename, filesize, filietype, etc.

for example i want SpamAssassin textfiles that are attached to be displayed
inline. however i do not want other textfiles that people send to me to be
inlined. and i most certainly do not want attached images to display inline,
since - as this bug decribes - kmail eats to much memory.
Comment 5 Stephan Kulow 2003-09-20 22:25:29 UTC
There can't be done a lot about such huge images (and there already exists a bug 
report against khtml for it's inability to handle huge images). 
 
But a filter for inline vs. smart is probably a good idea, but a wish. 
Comment 6 Myriam Schweingruber 2012-08-18 07:48:11 UTC
Thank you for your feature request. Kmail1 is currently unmaintained so we are closing all wishes. Please feel free to reopen a feature request for Kmail2 if it has not already been implemented.
Thank you for your understanding.
Comment 7 Luigi Toscano 2012-08-19 01:00:18 UTC
Instead of creating a new feature request, please confirm here if the wishlist is still valid for kmail2.