I want to get a transparent background or no background for my images. I tried the '-background none' option and also the 'transparent' option, but the background image remains white. How can I achieve this?
Please suggest.
I want to get a transparent background or no background for my images. I tried the '-background none' option and also the 'transparent' option, but the background image remains white. How can I achieve this?
Please suggest.
If you are using Imagemagik then the command is:
However it will only work with a pure white background and not a shade of white. There are alternative and easier ways to do this with IrfanView or The Gimp or Photoshop (more on that below). This article mentions that you may be using
convert.exe
that comes with Windows rather thanImageMagicks Convert.exe
in which case you should use the full path forConvert.exe
. http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10665If you are trying to achieve this from CSS then you misunderstand the css property. The css property 'background' refers to an html elements background color. I.e.
<p> <div> <body>
whatever. more here http://www.w3schools.com/css/css_background.aspIf you are referring the the image opacity property, that refers to how "see through" an image should be. more here: http://www.w3schools.com/Css/css_image_transparency.asp
The only way to get a transparent background in an image is to make the background of the image transparent using either the
PNG
(preferred) orGIF
formats. For this you can useIrfanView
and save a picture asPNG
, select the "save transparency" property and select the color from the image you want to be transparent or you can use Photoshop or The Gimp do do the same. Example forIrfanView
here http://llizard.etherwork.net/cwc/transp_irfanview.htmlThe Gimp example here http://aplawrence.com/Linux/crousegif.html
whats the format of your images? Try using png format