Create a PNG-24 image with transparent background

Posted on 2009-04-27
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' \



Open in new window

Question by:Pedro Chagas
    1 Comment
    LVL 3

    Accepted Solution

    The solution is change '-background \#020308' to '-background \#00000000', and change the file format to .png.

    Regards, JC
    $email = "";
    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' \

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
    Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now