Summary | Horde_Image_gd code hits memory limit on large images |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | |
Requester | vilius (at) lnk (dot) lt |
Created | 04/26/2007 (6726 days ago) |
Due | |
Updated | 05/04/2007 (6718 days ago) |
Assigned | 05/03/2007 (6719 days ago) |
Resolved | 05/04/2007 (6718 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
anymore, maybe only one is required. I guess it's only important to
not load the data twice in the same request. The one left untouched is
from the request that actual displays the thumbnail. The other two
should theoretically be from the request that displays the message.
Alternatively we could display a placeholder image in case of an
error, like the question mark image in Ansel.
State ⇒ Feedback
least the image data is not loaded in
IMP_MIME_Viewer_images::_getHordeImageObj() if not necessary. See if
this helps any.
invalid thumbnail image - or at least we will inform the user we are
going to display a thumbnail and then none will appear. That's why we
do the check twice - the first time is to check if we can even attempt
to load the thumbnail.
For now, I have changed the code to return an empty string for the
image data but we may want to rethink the original patch.
every image attachment. Could this also be the problem?
least the image data is not loaded in
IMP_MIME_Viewer_images::_getHordeImageObj() if not necessary. See if
this helps any.
but a page with an email message is at least displayed in the browser.
Thanks!
~104Mb. Does this mean that most email programs (including GD
library) just loads raw code into memory without any optimizations? I
to display any kind of image, of any size.
limit picture size?
library for the PHP project now.
every image attachment. Could this also be the problem?
the image data is not loaded in
IMP_MIME_Viewer_images::_getHordeImageObj() if not necessary. See if
this helps any.
Thunderbird and seems like you are right. Both clients started to
consume >300Mb of virtual memory.
However when I tried to open the same image in IrfanView it consumed
~104Mb. Does this mean that most email programs (including GD library)
just loads raw code into memory without any optimizations? I wonder
what could be done in such cases. Try to hack GD library to limit
picture size?
P.S. I also noticed that _getHordeImageObj() is called twice for every
image attachment. Could this also be the problem?
Taken from Michael Slusarz
State ⇒ Feedback
any format and 24 bit color depth consumes 300,000,000 bytes if I did
my math correctly. I bet such a size could easily hit the limit by
only loading the image into memory as soon you add the overhead of a
real application or do any operation with that data.
Try to load such an image into a desktop application.
State ⇒ Assigned
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: 55364
Queue ⇒ Horde Framework Packages
Summary ⇒ Horde_Image_gd code hits memory limit on large images
Type ⇒ Bug
with large images. Large not in filesize but in dimensions. Even if
memory limit is set 512mb (what is very big). Old code hasn't had such
problem. Attached is sample message with 10000x10000 pixels JPG (1.4mb).