Optimize to file size (image)

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Optimize to file size (image)

    Photoshop has a function called optimize to file size which tries to fit an
    image to some given file size. Because I need to make sure no images on a
    site I'm working on are larger than X KB I need something similar so that
    users don't have to worry so much about image file size. Does anyone know
    of a way to do this, preferably using ImageMagick or GD?

    Doing several calls to ImageMagick with different optimize settings is a not
    a good option.

    André Nęss
    André Nęss Guest

  2. Similar Questions and Discussions

    1. Will Flash optimize image sizes?
      Hello again everybody :) I have a question about the optimization of pictures placed in a Flash stage. If I put a big sized pictures (for...
    2. Image::Magick scale smaller makes file size bigger
      Hi, The problem is i'm using Image Magick to create thumbnails smaller images out of large ones. 99% of the time this works great but there's 1%...
    3. getting remote image size with Image::Size & LWP
       Thank you for your patience and help bringing me up to speed on how to be a better user of this list. My previous post was my first. I am...
    4. Image Qulaity....File Size
      I recieved an grayscale image (a photo) that was a TIFF document. Even though it shows under 'image size' as 72 ppi, it has good quality even at...
    5. How do I get the file size of an image?
      Hi, I have opened an image using the code below. I can read the physical dimesions of the image but I need to get the file size. Dim img As...
  3. #2

    Default Re: Optimize to file size (image)

    On Tue, 25 Nov 2003 13:52:01 +0000, André Nęss
    <andrena.spamreallysucks@ifi.uio.no> wrote:
    >Photoshop has a function called optimize to file size which tries to fit an
    >image to some given file size. Because I need to make sure no images on a
    >site I'm working on are larger than X KB I need something similar so that
    >users don't have to worry so much about image file size. Does anyone know
    >of a way to do this, preferably using ImageMagick or GD?
    >
    >Doing several calls to ImageMagick with different optimize settings is a not
    >a good option.
    I don't think there's any other alternative; there's no way of determining how
    well an arbitrary image will compress without doing at least most of the work
    of compressing it.

    --
    Andy Hassall (andy@andyh.co.uk) icq(5747695) ([url]http://www.andyh.co.uk[/url])
    Space: disk usage analysis tool ([url]http://www.andyhsoftware.co.uk/space[/url])
    Andy Hassall Guest

  4. #3

    Default Re: Optimize to file size (image)

    Andy Hassall:
    > On Tue, 25 Nov 2003 13:52:01 +0000, André Nęss
    > <andrena.spamreallysucks@ifi.uio.no> wrote:
    >
    >>Photoshop has a function called optimize to file size which tries to fit
    >>an image to some given file size. Because I need to make sure no images on
    >>a site I'm working on are larger than X KB I need something similar so
    >>that users don't have to worry so much about image file size. Does anyone
    >>know of a way to do this, preferably using ImageMagick or GD?
    >>
    >>Doing several calls to ImageMagick with different optimize settings is a
    >>not a good option.
    >
    > I don't think there's any other alternative; there's no way of
    > determining how
    > well an arbitrary image will compress without doing at least most of the
    > work of compressing it.
    Yeah I ended up definining a max width and height and forcing all images
    into 60% jpeg. This keeps me well within the limits. I'm sure there is an
    upper bound on how large a jpeg image can become if you know the max
    dimension, but I didn't bother to check.

    André Nęss
    André Nęss Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139