Make the background of an image transparent

Solved
Anselmedu25 -  
 Eric -
Hello!

Some images have a transparent background, I mean there is no white square around the drawing, for example. How can I make the background transparent, using software or something else?

Thank you.

Configuration: Windows 7 / Internet Explorer 9.0

2 answers

  1. Le Gnou
     
    Hello,

    The first thing to know when talking about transparency is that not all image formats handle it the same way.

    As an example, here are 3 common formats:
    • The JPG/JPEG format does NOT support transparency,
    • The GIF format only handles two levels of transparency (in addition to being limited to 256 colors),
    • The PNG format supports 256 levels of transparency.


    So, if you are using a JPG image, for example, you will need to save it as a PNG after making parts of the image transparent, otherwise that transparency will not be preserved.
    ;)

    The second thing is that you need to add an alpha channel: it's what will contain the transparency information (which parts will be transparent, with what level of transparency...).
    ;)

    On the software side:

    An example, with this image:
    https://pix.toile-libre.org/upload/original/1360212716.jpg

    Since the image is in JPG format, the first thing: add an alpha channel.
    • In Photofiltre 7: Image > Mode > RVBA (alpha channel)
    • In Gimp: Layer > Transparency > Add Alpha Channel.


    Then... well, select the parts of the image you want to make transparent, and delete...

    The selection tools in Photofiltre 7:
    https://www.cjoint.com/13fe/CBhgh5BBIh0_capture01.jpg
    If you want to remove a whole color, like here, the black, Image > Transparency Color. In the window that appears, choose black:
    https://pix.toile-libre.org/upload/original/1360213907.jpg

    Once the areas are transparent: File > Save As, and choose PNG.
    ;)

    With Gimp, the principle is the same, add an alpha channel, use the selection tools:
    https://pix.toile-libre.org/upload/original/1360214250.jpg
    ...and delete the parts of the image...

    You can also choose to remove a color globally like in Photofiltre: Layer > Transparency > Color to Alpha.
    Then, File > Export, and there too choose PNG.
    ;)

    Note that in both software, to indicate which parts are transparent, they appear as a checkerboard pattern:
    https://pix.toile-libre.org/upload/original/1360214795.jpg
    ... this checkerboard is only there to show you the transparent areas and will not be visible once the image is saved...
    ;)

    More info on transparency and the alpha channel:
    http://leblogdugnou.blogspot.fr/2012/03/transparence-et-canal-alpha-images.html
    http://leblogdugnou.blogspot.fr/2012/12/retour-sur-le-canal-alpha.html
    ;)

    @+

    (_._)
    -0|0-
    205
    1. Anselmedu25
       
      Thank you so much! Thanks to you, I succeeded!
      1
    2. Le Gnou > Anselmedu25
       
      You're welcome... glad you managed to do it.
      ;)

      See you later


      (_._)
      -0|0-
      0