Same problem, I tried doing an imagecreatefromjpeg() on a 400Kb image and it used close to 8MB of memory (all of it) leaving none left for the imagecreatetruecolor().
The same procedure with a 50Kb image used about 2.3Mb for the imagecreatefromjpeg() and a further 1.25Mb for an imagecreatetruecolor().
Presumably the amount of memory used relates to the complexity of the image in the same way that two 50% quality jpegs of the same dimensions can have very different sizes.
Anyone got a rule of thumb for jpeg file size and memory usage?
Would ImageMagick use much less?
This is a pretty serious limitation on the GD libs for me as it means I can't build a muppet proof interface for my web site. Yes I can limit the file size my users are permitted to upload but if they have taken their photos straight off their digital cameras and don't know how to resize them they might well give up on trying to use my site all together!?!