remove transparent background in GIF
Moderators: helmut, XnTriq, xnview
remove transparent background in GIF
I some gifs that have transparent background and I'd like to remove transparency and set background to white (or some other color).
Is it possible to do this? Would the process be the same for PNG as well?
As it is, I write html that centers image in generous borders, take a screenshot, and trim back to original size. (arghh!)
Thanks ...
Is it possible to do this? Would the process be the same for PNG as well?
As it is, I write html that centers image in generous borders, take a screenshot, and trim back to original size. (arghh!)
Thanks ...
Re: remove transparent background in GIF
Hi Pierre,
Thanks.
I believe the GIF is 8 bit BW (256 greyscale).
When I open the gif for editing, there is no background. The standard XnView background (mid-grey) "shows thru." A few "blurry" scratchings(?) show thru. They become dark lines on a white background when the gif is displayed in a browser.
In XnView, when I first open Image > Edit palette, the "enable transparency" box is checked, and the selected background is RBB 0,0,0.
(I don't know if it matters, but under edit > background color ... the background color is white RGB 255,255,255.)
Using Edit palette, when I select a transparency color, preferably white (or any shade of grey), and then deselect the "enable transparency" box, the background always reverts to black.
Is there a way to turn transparency off and change the background to white (or some other color) as if it was displaying in a browser?
Thanks,
Bert
Thanks.
I believe the GIF is 8 bit BW (256 greyscale).
When I open the gif for editing, there is no background. The standard XnView background (mid-grey) "shows thru." A few "blurry" scratchings(?) show thru. They become dark lines on a white background when the gif is displayed in a browser.
In XnView, when I first open Image > Edit palette, the "enable transparency" box is checked, and the selected background is RBB 0,0,0.
(I don't know if it matters, but under edit > background color ... the background color is white RGB 255,255,255.)
Using Edit palette, when I select a transparency color, preferably white (or any shade of grey), and then deselect the "enable transparency" box, the background always reverts to black.
Is there a way to turn transparency off and change the background to white (or some other color) as if it was displaying in a browser?
Thanks,
Bert
Re: remove transparent background in GIF
When the image is open with Image > Edit palette... selected, could you try double-clicking on the indicated colour, selecting white from the colour chooser that appears, and then deselecting Enable transparency ...molecule wrote:Is there a way to turn transparency off and change the background to white (or some other color) as if it was displaying in a browser?
If that doesn't work could you upload a sample image?
Re: remove transparent background in GIF
double clicking a color on the color palatte opens the color picker -- deselecting transparency has the results as before.
attached is an upload of the gif ... edit -- when uploaded the "normal" grey (i.e. transparent) background is converted to black
thanks
attached is an upload of the gif ... edit -- when uploaded the "normal" grey (i.e. transparent) background is converted to black
thanks
Re: remove transparent background in GIF
Yes, the image as uploaded lacks transparency when downloaded and opened?molecule wrote:attached is an upload of the gif ... steiner_bees_00test.gif
edit -- when uploaded the "normal" grey (i.e. transparent) background is converted to black

Could you try placing the image file in a ZIP (or RAR) archive and uploading that, and then check if transparency is maintained when it is downloaded and opened?
I don't normally work with transparency but my suggestion above worked with a test image I downloaded, XnTriq is the transparency expert...

Re: remove transparent background in GIF
Possibly overtaken by events...
The image of the file you uploaded, when clicked on, displays the image with the original gray background, and that file can be saved and opened in XnView.
I then followed the steps in my first post, noting that the top right [black?] square in the displayed palette [?] was just-visibly marked with a surrounding square; I then double-clicked the square and set the colour to white, then deselected transparency.
Is that the result you need, or am I misunderstanding something?
The image of the file you uploaded, when clicked on, displays the image with the original gray background, and that file can be saved and opened in XnView.
I then followed the steps in my first post, noting that the top right [black?] square in the displayed palette [?] was just-visibly marked with a surrounding square; I then double-clicked the square and set the colour to white, then deselected transparency.
Is that the result you need, or am I misunderstanding something?
Re: remove transparent background in GIF
molecule wrote:when uploaded the "normal" grey (i.e. transparent) background is converted to black
- http://newsgroup.xnview.com/download/file.php?id=2428 +
http://newsgroup.xnview.com/download/fi ... &mode=view[/b] = 800×556 = original file as uploaded = transparency intact - http://newsgroup.xnview.com/download/fi ... 428[b]&t=1[/b] = 640×445 = thumbnail generated by forum software = transparency lost
You already hit the nail on the head with your previous post, cdaycday wrote:XnTriq is the transparency expert...

- Open steiner_bees_00test.gif in XnView.
- Go to Image » Edit Palette..., deactivate Enable transparency and confirm with OK.
- Go to View » Display Colour Information: The mouse cursor changes to an eye-dropper.
- Move the cursor over the background area: The palette index (and RGB values etc.) of the background color are displayed in the tooltip.
- Go to Image » Edit Palette... once again, find the background color (ie. Index = 0 / RGB = 0,0,0) and double-click on it to bring up the color picker.
- Change the color to white (RGB = 255,255,255) and save your image.
Re: remove transparent background in GIF
Isn't the transparency colour indicated directly when Image > Edit palette... is opened, as seen more clearly for this GIF:XnTriq wrote:
- Open steiner_bees_00test.gif in XnView.
- Go to Image » Edit Palette..., deactivate Enable transparency and confirm with OK.
- Go to View » Display Colour Information: The mouse cursor changes to an eye-dropper.
- Move the cursor over the background area: The palette index (and RGB values etc.) of the background color are displayed in the tooltip.
- Go to Image » Edit Palette... once again, find the background color (ie. Index = 0 / RGB = 0,0,0) and double-click on it to bring up the color picker.
- Change the color to white (RGB = 255,255,255) and save your image.
In steiner_bees_00test.gif the rectangle around the top left colour was barely visible.

The procedure I followed was:
- Open steiner_bees_00test.gif in XnView.
- Go to Image » Edit Palette... ;
- Double-click on the indicated transparency colour;
- Select the desired new colour;
- Deselect Transparency and save the image.
Re: remove transparent background in GIF
cday wrote:Isn't the transparency colour indicated directly when Image > Edit palette... is opened, as seen more clearly for this GIF:

Re: remove transparent background in GIF
thank you everyone!
I see my mistake ... in the Edit Palette dialog, I had clicked on the color that I had desired (white 255,255,255), instead of the transparency color with the little box around it (black 0,0,0) that had already been selected.
This time, I use Edit Palette once, carefully scan the palette for the already selected transparency color (black), double click on it and pick my new color (white), and then deselect enable transparency. Voila!
Wonderful!
Thanks guys!
Bert
I see my mistake ... in the Edit Palette dialog, I had clicked on the color that I had desired (white 255,255,255), instead of the transparency color with the little box around it (black 0,0,0) that had already been selected.
This time, I use Edit Palette once, carefully scan the palette for the already selected transparency color (black), double click on it and pick my new color (white), and then deselect enable transparency. Voila!
Wonderful!
Thanks guys!
Bert