[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Create a PNG-24 image with transparent background

Posted on 2009-04-27
1
Medium Priority
?
2,902 Views
Last Modified: 2013-11-08
Hi E's, this is the first question in ImageMagick area.
With the code in snippet code, I create a image for protect the e-mail of my customers, but this example the background is '#020308'.
I want do the same thing, but with a transparent background and a png-24 file.
For png-24 maybe I have to do in this way: "../imagem/email.png");".

So I need some help to do a png-24 with transparent background.

Regards, JC
exec("/usr/local/bin/convert -background \#020308  -fill \#FFFFFF  -font /home/luis/public_html/pre/fonts/CALIBRI.TTF -pointsize 14 \
          -size 350x17  -gravity West caption:'E-mail: $email' \
						../imagem/email.jpg");
							}

Open in new window

0
Comment
Question by:Pedro Chagas
1 Comment
 
LVL 3

Accepted Solution

by:
Pedro Chagas earned 0 total points
ID: 24244162
The solution is change '-background \#020308' to '-background \#00000000', and change the file format to .png.

Regards, JC
<?
$email = "customer@mail.tv";
exec("/usr/local/bin/convert -background \#00000000  -fill \#FFFFFF  -font /home/tags/public_html/bastidores/test/CALIBRI.TTF -pointsize 14 \
          -size 350x17  -gravity West caption:'E-mail: $email' \
						email.png");
?>

Open in new window

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month18 days, 10 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question