Ben Holmen

How To Send E-mail Birth Announcements

Megan and I launched our first online business this week, Baby Tattle e-mail birth announcements. For $49.95, you can send a classy custom e-mail to as many contacts as you’d like with photos of your newborn. At the moment we have eight designs available and I will be adding two a week for the next five weeks.

Please take a look and let me know what you think!

How to send e-mail birth announcements
Unique online birth announcements

Filed under: Web Design — Ben @ 8:22 pm January 10, 2009

Adding PNG Watermarks to JPEGs with PHP

This took up a good chunk of my afternoon. I have a client who wants to upload JPEG images to his website and have them automatically resized and watermarked with copyright information to discourage image theft. Resizing is a piece of cake — I’ve done that before — but getting the alpha transparency of a 24-bit PNG to overlay correctly was maddening.

It turns out that the solution is actually really simple. The code is below:
$photo = imagecreatefromjpeg("original.jpg");
$watermark = imagecreatefrompng("watermark.png");
// This is the key. Without ImageAlphaBlending on, the PNG won't render correctly.
imagealphablending($photo, true);
// Copy the watermark onto the master, $offset px from the bottom right corner.
$offset = 10;
imagecopy($photo, $watermark, imagesx($photo) - imagesx($watermark) - $offset, imagesy($photo) - imagesy($watermark) - $offset, 0, 0, imagesx($watermark), imagesy($watermark));
// Output to the browser
header("Content-Type: image/jpeg");
imagejpeg($photo);

The most maddening solutions are sometimes the easiest.

Filed under: Web Design — Ben @ 10:59 pm December 2, 2008

E-mail Birth Announcement

I just finished an e-mail birth announcement that I sent to my clients. We’ll be sending out a similar hard copy announcement soon!

View the Announcement

I’m planning on launching a new e-mail birth announcement website in January 2009. Baby Tattle E-mail Birth Announcements

Filed under: Family, Web Design — Ben @ 10:31 am November 8, 2008

« Newer Posts