News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

GD graphics through php

Started by Kader, February 25, 2008, 03:05:45 PM

Previous topic - Next topic

Kader

Hi all

I have a couple of questions:
1) Does gd 2 support SVG graphics?
2) A snippet of php code that will allow me to generate a transparent graphic that will blend with any background behind it. Something similar to:


header("Content-type: image/png");
....
....
$height = 20;
$width= 100;
$image = ImageCreate($width, $height);
$background = ImageColorAllocate($image,236,237,243);
$black = ImageColorAllocate($image,0,0,0);
$font = 'arial.ttf';
ImageTTFText($image, 12, 0, 0, 15, $black, $font, $string);
ImagePNG($image);
ImageDestroy($image);


But allows a transparent background


Thanx for the support

metallica48423

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Advertisement: