"On the fly" images

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chuck Anderson

    "On the fly" images

    I have a web page/script that displays image files residing on disk. I
    do not know what size they are (in pixels), so I want to be able to
    resize an image if it is bigger than the limit I allow (say, 900 pixels
    wide).

    I want to create the resized image in memory and serve it directly,
    without saving the resized image to disk (they are only temporary, and
    I'd rather not worry about cleanup). I know how to use some of the GD
    library and I also know how to use ImageMagick. I would prefer to use
    ImageMagick, as it has a good quality Unsharp mask (usually needed after
    a resize/resample of an image), but I don't know if it is capable of
    doing this (creating the image in memory so I can serve it directly
    without saving it to disk first).

    Using the GD library, I need only use a header to set the MIME type and
    then imagejpeg to serve the resized image directly from memory.

    Does anyone happen to know if I can I accomplish the same thing with
    ImageMagick?

    Also, ... does anyone know of any good tutorials or scripts for
    on-the-fly image editing (ImageMagick or GD lib)? (This is a pretty
    good one: <http://codewalkers.com/tutorials/42/1.html Any others? Any
    that use ImageMagick?)

    --
    *************** **************
    Chuck Anderson • Boulder, CO

    Everyone's journey should be different,
    so that we all are enriched
    in new and endless ways
    *************** **************
  • Geoff Berrow

    #2
    Re: &quot;On the fly&quot; images

    Message-ID: <JImdnYfCIOJdBT HZnZ2dnUVZ_u6dn Z2d@comcast.com from Chuck
    Anderson contained the following:
    >I want to create the resized image in memory and serve it directly,
    >without saving the resized image to disk (they are only temporary, and
    >I'd rather not worry about cleanup). I know how to use some of the GD
    >library and I also know how to use ImageMagick. I would prefer to use
    >ImageMagick, as it has a good quality Unsharp mask (usually needed after
    >a resize/resample of an image), but I don't know if it is capable of
    >doing this (creating the image in memory so I can serve it directly
    >without saving it to disk first).
    If you are going to use the image again, or someone else might, it is
    better to save it. There are various custom unsharp mask functions
    available for the GD functions if you don't have Imagemagick available
    but tend to be a bit slow.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    • David

      #3
      Re: &quot;On the fly&quot; images

      Geoff Berrow wrote:
      Message-ID: <JImdnYfCIOJdBT HZnZ2dnUVZ_u6dn Z2d@comcast.com from Chuck
      Anderson contained the following:
      >
      >I want to create the resized image in memory and serve it directly,
      >without saving the resized image to disk (they are only temporary, and
      >I'd rather not worry about cleanup). I know how to use some of the GD
      >library and I also know how to use ImageMagick. I would prefer to use
      >ImageMagick, as it has a good quality Unsharp mask (usually needed after
      >a resize/resample of an image), but I don't know if it is capable of
      >doing this (creating the image in memory so I can serve it directly
      >without saving it to disk first).
      >
      If you are going to use the image again, or someone else might, it is
      better to save it. There are various custom unsharp mask functions
      available for the GD functions if you don't have Imagemagick available
      but tend to be a bit slow.
      >
      There is a cgi script called gd-imager that allows you to resize your
      images by passing the height and width on the url. You can find the
      program here


      Comment

      Working...