Welcome to TalkGraphics.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2002
    Location
    London
    Posts
    463

    Default How can I export an GIF image with a transparent border?

    Hi

    How do I create an (GIF) image (e.g. a button graphic) with a transparent border.

    I have created my button, and behind it I have created a 'background' shape of the desired pixel dimensions. I then make the background shape transparent and with it still selected I try to export.

    The problem I have is that if you have a shape that is completely transparent then it seems to ignore shapes above it when you come to export an image with just it selected...

    - Any thoughts?

    Ship
    Shiperton Henethe

  2. #2
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: How can I export an GIF image with a transparent border?

    Hi Ship,

    I'm afraid how you are going about creating a transparent gif will not work. Even if you make your background shape 99.5% transparent it will reveal the colour of your work area due to how a gif antialiases.

    Select the object you want to be visible in your gif and export with transparency. The objects will be antialiased to the work area colour or if another unselected object is behind you selection the antialiasing will be to the colour of the unselected object.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	trans-gif1.gif 
Views:	249 
Size:	15.2 KB 
ID:	66784   Click image for larger version. 

Name:	trans-gif2.gif 
Views:	227 
Size:	14.3 KB 
ID:	66785  

    Click image for larger version. 

Name:	trans-gif3.gif 
Views:	226 
Size:	15.0 KB 
ID:	66786  
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,936

    Default Re: How can I export an GIF image with a transparent border?

    Not sure that's correct Bill. If you create a button and place a larger shape behind it with no fill/no line colour then select all and export as a transparent gif the button will be the size of the background transparent shape but keep the button visible.

    http://www.screencast.com/users/Egg_...9-1fabe4ddd044
    Last edited by Egg Bramhill; 15 October 2009 at 09:04 PM.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  4. #4
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: How can I export an GIF image with a transparent border?

    Egg isn't that what I said?

    If the background object is selected, even if invisible it reveals the background (workarea) colour as shown in the first attached image in my previous post.

    If there is no background object or the background object is not selected the exported gif is antialiased to the colour of the workarea or background object (not selected).
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  5. #5
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,936

    Default Re: How can I export an GIF image with a transparent border?

    No I don't think it is Bill.

    If the background object is selected, even if invisible it reveals the background (workarea) colour
    If the background object is selected & invisible, whilst the foreground object is visible, selecting both and exporting as a transparent gif only shows the foreground object but the background object remains transparent.

    Basically I'm not using any of your scenarios, I'm selecting both the non filled/stroked rear rectangle AND the visible foreground object and exporting as a transparent gif. I don't think any of your options do this.

    Hope I'm not getting confused here.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  6. #6
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: How can I export an GIF image with a transparent border?

    Quote Originally Posted by Egg Bramhill View Post
    If the background object is selected & invisible, whilst the foreground object is visible, selecting both and exporting as a transparent gif only shows the foreground object but the background object remains transparent.
    Egg the first attached image shows two object above an 70% black work area.

    The second attachment shows the same two objects but the rounded rectangle has been made 99.5% transparent.

    The third attachment is the exported transparent gif. The black object at 99.5% transparent isn't visible, however the work area below the object is visible in the exported gif image.

    The fourth attachment shows the same two foreground objects over a medium-dark cyan work area. Again the black rounded rectangle at 99.5% transparency is not visible but the work area under it is shown in the exported transparent gif.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	trans-test1.gif 
Views:	224 
Size:	2.3 KB 
ID:	66796   Click image for larger version. 

Name:	trans-test2.gif 
Views:	209 
Size:	2.5 KB 
ID:	66797  

    Attached Images Attached Images   
    Attached Files Attached Files
    Last edited by Soquili; 16 October 2009 at 12:00 AM.
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  7. #7
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,936

    Default Re: How can I export an GIF image with a transparent border?

    Ah! now I'm with you Bill. The trick is not to use a 99.5% transparency but a no fill no stroke background image.

    Open my xar and select both shapes an export as a transparent gif. The background rectangles no longer visible.
    Attached Files Attached Files
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  8. #8
    Join Date
    Nov 2000
    Location
    Red Boiling Springs TN USA
    Posts
    19,208

    Default Re: How can I export an GIF image with a transparent border?

    Ah, now I'm with you Egg.
    Soquili
    a.k.a. Bill Taylor
    Bill is no longer with us. He died on 10 Dec 2012. We remember him always.
    My TG Album
    Last XaReg update

  9. #9
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,936

    Default Re: How can I export an GIF image with a transparent border?

    Thank heavens for that Bill, my brain was starting to hurt ;-)
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  10. #10
    Join Date
    Nov 2002
    Location
    London
    Posts
    463

    Default Re: How can I export an GIF image with a transparent border?

    Thanks.

    I think there may have been a slight bug slowing up in what I was trying to do.
    My Xara file is quite large 1.2MB and starting to creak!
    E.g. When rendering JPGs it sometimes 'forgets' how to anti alias. Changing the set view quality up and down *seems* to resolve the (intermittent) problem...

    Cheers


    Ship

 

 

Tags for this Thread

Bookmarks

Posting Permissions

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