Friday, May 20, 2011

Converting a White background to Tranparent (Photoshop)

Here's a great tip if you have to "peel" a white background off an image which is much cleaner than using the magic wand, as the magic wand often leaves either a halo or a jagged/untidy edge.

1. copy the image to a new layer and delete the background layer
2. copy the image to a new layer again and INVERT it
3. copy the inverted layer into the clipboard, and switch off its visibilty for now
4. go back the the +ve image and create a layer mask
5. press ALT whilst clicking on the mask thumbnail
6. paste the inverted image, then click back to the image thumbnail in the layer palette
7. duplicate this new layer until necessary (5 times?) and delete the inverted layer you created at the start
8. merge down the layers one by one (Ctrl-E) choosing to "apply mask" each time

Friday, May 6, 2011

Benefits of Garlic

Benefits of garlic are numerous. Garlic, like the onion, has a powerful effect on healing wounds and is also very good as a disinfectant. The old Greeks placed garlic on stones at cross roads as a dinner for their triple goddess Hecate who was Diana on earth, Phoebe in heaven and Proserpine in hell.

As with horseradish, it is difficult to juice garlic in the machine because of the strong essential oils which can only be removed with the greatest difficulty. So we crush it and the resulting liquid is easily incorporated into juices or taken in small amounts by itself.

In 1936 Caspari demonstrated in the laboratory that garlic can destroy the bacterium staphylococcus and that this might be the basis for the use of garlic as a medicine. Later on studies with animals demonstrated the effect of garlic in improving the condition of arteriosclerosis whilst at the same time bringing down the blood-pressure.

Garlic acts well against cataract, particularly in smokers, and for colds. Like onion juice, one dessertspoonful of garlic in half a pint of warm water (10ml in 275ml water) is a recognized remedy for worms in children. One suspects that children in Mediterranean countries must be well protected against worms, and statistics show that their parents have a lower incidence of heart disease than most Europeans, all of which helps to confirm the therapeutic value of this bulb.

The great benefit from garlic was demonstrated in a controlled trial on sufferers from long-standing intestinal disorders such as persistent diarrhea with accompanying headaches. These symptoms disappeared in the patients having garlic juice, but even more importantly, an entirely fresh and improved quality was found in the intestinal flora, those bacteria which aid the digestion of food.

Garlic juice has been used beneficially for many conditions including those mentioned already plus tuberculosis, entercolitis and amoebic dysentery. It is an expectorant as well as assisting asthma and bronchitis.

Garlic and garlic juice has been used as a medicine for some 5,000 years and we would be misguided not to use it on account of the smell. If you cannot bear to use it with your juices than take garlic in the form of capsules which do not dissolve until they have reached the intestine.

Garlic is by far the best common food source of germanium. Containing around 750 parts per million. It also seems to be better at concentrating selenium than most other fruits and vegetables, supplying 20 micrograms per100g. The exact quantity of these elements will depend on where your garlic was grown as some soils have richer supplies than others. Both germanium and selenium are considered to be important antioxidants.

Thursday, May 5, 2011

HTML5/CSS3 Fonts with @font-face

Embedding specific fonts on a web page, traditionally, has been accomplished using images.  Though IE 5.0+ allowed you to embed fonts on your web page, they needed to be in EOT (Embedded OpenType) format.  Other browsers supported TTF (TrueType) and OTF (OpenType) fonts.  IE9 now supports TTF, OTF and also WOFF (Web Open Font).  To accomplish the task of embedded real fonts into your web pages, use the CSS3 @font-face rule.

Where to get quality FREE fonts for use in web pages?  FontSquirrel is a great place with hundreds of free fonts, including kits that demonstrate how to embed and use them into a web page, plus a generator to create your own.  With the kit, you get the font in all the formats so that you can craft your web pages to support all the major browsers.

As an example, this is how the font Garogier can be embedded:


   1:  @font-face {
   2:      font-family: 'GarogierRegular';
   3:      src: url('fonts/Garogier_unhinted-webfont.eot');
   4:      src: url('fonts/Garogier_unhinted-webfont.woff') format('woff'),
   5:      url('fonts/Garogier_unhinted-webfont.ttf') format('truetype'),
   6:      url('fonts/Garogier_unhinted-webfont.svg#webfontew0qE0O9') format('svg');
   7:      font-weight: normal;
   8:  }


The EOT font is placed first so that IE8 and earlier can see it first.  The users browser will try each one until it finds one that works.  With that done, we can now use our newly defined font-family:


   1:  body{
   2:      font-family: "GarogierRegular";
   3:  }


Free Fonts

Some places to find free fonts; there are dozens more…