Shrinking icons

Discussion in 'Java' started by Roedy Green, Jan 29, 2006.

  1. Roedy Green

    Roedy Green Guest

    I spend a fair bit of time manually shrinking icons then trying to
    touch them up to look decent.

    I figure this process aught to be automatable.

    1. when shrinking it does antialiasing.

    2. when shrinking it does antialiasing with background transparency
    (png).

    3. maybe if it were really clever it could try to extract regions of
    the icon logically, then blow the icon up and smooth the regions and
    sharpen the edge using spline curves, then start from that point to
    shrink down again, rather than trying to match the precise pixel grid
    of the original.

    the idea might be you create icons on a large scale, perhaps starting
    with photos, and let the software deal with much of the work of
    dealing with low res pixelation, much the way PostScript fonts are
    rendered.

    has anyone tackled a project like this?
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Jan 29, 2006
    #1
    1. Advertising

  2. "Roedy Green" <> wrote in
    message news:...
    >I spend a fair bit of time manually shrinking icons then trying to
    > touch them up to look decent.
    >
    > I figure this process aught to be automatable.
    >
    > 1. when shrinking it does antialiasing.
    >
    > 2. when shrinking it does antialiasing with background transparency
    > (png).
    >
    > 3. maybe if it were really clever it could try to extract regions of
    > the icon logically, then blow the icon up and smooth the regions and
    > sharpen the edge using spline curves, then start from that point to
    > shrink down again, rather than trying to match the precise pixel grid
    > of the original.
    >
    > the idea might be you create icons on a large scale, perhaps starting
    > with photos, and let the software deal with much of the work of
    > dealing with low res pixelation, much the way PostScript fonts are
    > rendered.
    >
    > has anyone tackled a project like this?


    I had annoying problems with background transparency colors, when I was
    trying to make a spinning object. The stupid paint program antialiased the
    background color leaving a horrible tracer around the spinning object.

    I looked for something [free] that would mind a transparency and found
    nothing.

    --
    LTP

    :)
     
    Luc The Perverse, Jan 29, 2006
    #2
    1. Advertising

  3. Roedy Green

    Chris Uppal Guest

    Roedy Green wrote:

    > 3. maybe if it were really clever it could try to extract regions of
    > the icon logically, then blow the icon up and smooth the regions and
    > sharpen the edge using spline curves, then start from that point to
    > shrink down again, rather than trying to match the precise pixel grid
    > of the original.


    Not quite the same, but I have experimented a little with using
    PostScript to define icons' content.

    I haven't really got it to "production" quality yet, but I use Aladdin
    Ghostscript to render the images at different depths and resolutions
    (anti-aliased for both text and graphics) and then assemble the results
    into a Windows .ICO file. That's all done programmatically. I don't
    have a solution for transparency, though, since Ghostscript doesn't
    (yet?) understand alpha-blending.

    -- chris
     
    Chris Uppal, Jan 29, 2006
    #3
  4. Roedy Green wrote:
    > the idea might be you create icons on a large scale, perhaps starting
    > with photos, and let the software deal with much of the work of
    > dealing with low res pixelation, much the way PostScript fonts are
    > rendered.


    PostScript fonts are vector data, that is something completely different
    than pixels. Also, good fonts have so called hints (data in the font
    file), which is additional information for the font-rendering in a
    particular size. Which means, their resizing is not done fully automatic
    from just the vector data. Instead at one point the font designer sat
    down and optimized the font resizing for particular sizes by providing
    the hinting.

    > has anyone tackled a project like this?


    It's a long time ago that I looked into something like this. Shrinking a
    raster image is actually a re-sampling of the image data, which involves
    our good old friend, the Nyquist-Shannon sampling theorem. So the
    classic way to calculate a smaller image (consisting of fewer samples
    than the original), is to run a digital filter to get things
    mathematically right. However, getting things mathematically right does
    not guarantee that things look nice.

    Any book about image processing should contain a bunch of typical
    filters which you might want to try.

    /Thomas
    --
    The comp.lang.java.gui FAQ:
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
    http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
     
    Thomas Weidenfeller, Jan 30, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    440
  2. Jerry Mcnealy
    Replies:
    0
    Views:
    334
    Jerry Mcnealy
    Aug 14, 2007
  3. Jerry Mcnealy
    Replies:
    0
    Views:
    415
    Jerry Mcnealy
    Aug 14, 2007
  4. Richie Williams
    Replies:
    5
    Views:
    1,536
    Richie Williams
    Oct 25, 2007
  5. Yash Ganthe
    Replies:
    3
    Views:
    253
    Yash Ganthe
    May 23, 2009
Loading...

Share This Page