Re: imagecreatefromjpeg() uses too much memory



the problem is not how big in bytes your jpeg is but how large its
dimensions are.

when you imagecreatefromjpeg() the function sort of "decode" and stores
it n memory as "raw data" (well not exactly but as big as it'd be) then
you can really get huge usage with files larger than 1024x768 lets say.

i'd say that even if you change your ISP for someone with a bigger
memory limit it'd crash anyway with GD - at least when someone uploads
a big enough picture.

have you considering limiting the dimensions of the picture? it'll be
boring for the users tho :P

it will be almost impossible to use external features such as
Imagemagick instead of gd on a shared host.

.



Relevant Pages

  • Re: Dell to Sell Computers at Wal-Mart
    ... Yes, but Dimensions will outsell emachines hands down, which is exactly what ... penetration into thousands of stores all at once. ... Dell's own mail order prices for equivalent configurations. ...
    (alt.sys.pc-clone.dell)
  • Re: Resize two face images to same size in PS?
    ... The problem I have is both images need to be ... Suppose each picture is 2000 by 3000 pixels. ... read the coordinates, and calculate the dimensions. ... Calculate the ratio between the two measurements (assume this comes to 1.113 for ...
    (comp.graphics.apps.photoshop)
  • Re: Fit to Screen Height option?
    ... Please enlighten us on how to perfectly fit a 3500 x 2500 picture ... of the dimensions. ... picture as large as possible without any part of the picture missing. ... Depending on the shape of the Preview window at the time the resulting image ...
    (comp.sys.mac.system)
  • Inventory stock - semiadditive misures
    ... I'm in trouble with an Analysis Services inventory cube with three ... dimensions (stores, productc, time) and one measure ... Supposing that my time dimensions is flat, I would like to ... time leaf level) and found all cells with the correct quantity in stock. ...
    (microsoft.public.sqlserver.olap)
  • Re: Image height and width
    ... In the context of HTML, the width and height attributes of any element ... course you can always *try* to resize them to the inherent dimensions ... I resize my picture to 900 x 675 pixels, ...
    (comp.infosystems.www.authoring.stylesheets)