Nasty White Border

Discussion in 'Graphics & Multimedia' started by egdcltd, Sep 18, 2006.

  1. #1
    Is there any way of stopping that nasty white border that keeps cropping up around gifs on a transparent background? Without changing the image format, or deleting it one pixel at a time.
     
    egdcltd, Sep 18, 2006 IP
  2. Wekky

    Wekky Active Member

    Messages:
    192
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #2
    without the mentioned methods, not really. you could try using a magic wand tool, and deleting the pixels, but i don't know how that would affect the original picture.
     
    Wekky, Sep 18, 2006 IP
  3. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #3
    Can you show us the image? I think I know what's going on but I don't want to say without looking at an image.
     
    sketch, Sep 20, 2006 IP
  4. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Heres one of them. The border isn't noticeable on a white background, but it is on a coloured one.

    [​IMG]
     
    egdcltd, Sep 20, 2006 IP
  5. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #5
    That image is really tiny so I could barely see the white... but what it may be is that your original image has anti-aliased edges, which GIFs don't support.

    Unfortunately, as Wekky said, the only way to fix it is to go in and delete the white pixels. Unless you have the original files from which the GIFs were output.

    If your GIFs will all go on the same (or similar) colored page, I recommend setting your "matte" to the page's color when outputting your GIFs. Otherwise you'll have to output your GIFs with aliased ("jagged" or "stair-stepped") edges, OR you can output in 24-bit PNG, which supports anti-aliased transparencies, but is not supported by IE6 or lower.
     
    sketch, Sep 20, 2006 IP
  6. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Unfortunately, the image is the size it's needed to be.

    It, and others, were captured from a png file, where they were on a transparent background. I think something went wrong when they were reduced in size; only a slight difference, most of the originals were in the region of 30x30.

    Can't use png, as the script doesn't use them, also they will be on lots of differently coloured backgrounds.
     
    egdcltd, Sep 20, 2006 IP
  7. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #7
    Then that's where the white's coming from, when you downsized the PNGs, you introduced anti-aliasing and when outputting the GIFs, the white that was more than 50% opaque was kept.
     
    sketch, Sep 20, 2006 IP
  8. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Is there any way of preventing it?
     
    egdcltd, Sep 20, 2006 IP
  9. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #9
    There's nothing you can do to prevent it, but in the future you should follow the steps I laid out in my second response. There will always be some manual labor required to get clean edges on an anti-aliased GIF.

    Some may say simply convert your image to indexed colors (256) before saving, which I don't advise as image quality will suffer.
     
    sketch, Sep 20, 2006 IP