Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   HTML / DHTML (http://siteownersforums.com/forumdisplay.php?f=7)
-   -   PNG transparency issue (http://siteownersforums.com/showthread.php?t=59716)

davikerkrish 09-06-2012 04:00 AM

PNG transparency issue
 
Every designer would have faced this issue, obviously! Though there are a number of javascript based solutions, I couldn�t find anything that supports background position. As far as I know all JS based solutions end up with the same result. This is something that worked flawlessly for me. All other solutions are based on this filter.

.class_name
{
background:none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (src='image_name.png', sizingMethod='scale');
}

abhirampathak3 12-05-2012 05:31 AM

PNG transparency issue

$Image = ImageCreateTrueColor(80, 40);

$back = ImageColorAllocate($Image, 255, 255, 0);
$red = ImageColorAllocate($Image, 255, 0, 0);
$green = ImageColorAllocate($Image, 0, 255, 0);
$black = ImageColorAllocate($Image, 0, 0, 0);

ImageColorTransparent($Image, $back);
ImageFilledRectangle($Image, 0, 0, 80, 40, $back);
ImageArc($Image, 20, 20, 32, 32, 120, 0, $red);
ImageString($Image, 5, 20, 20, "hello", $black);

ImagePNG($Image, "c:/bad.png");
?>

andrewneil85 04-26-2013 10:26 PM

Its good way, but can't we make the images with transparent images?
Or these codes' result will appear more attractive, please clear.


All times are GMT -7. The time now is 07:09 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.