Web
News |
Bluestreak Technology Raises USD $20 Million in... Bluestreak Technology, Inc., the developer of the MachBlue? platform for mobile phones and digital television, announced today that it has secured USD $20 million in Series D financing. France's Iris Capital...
Council urges B.C. government to jump into green... The Premier's Technology Council is urging the British Columbia government to take advantage of the worldwide demand for clean, green products and services. In its 10th report to government, the council focused on...
Tough luck for Canada at World Cyber Games Canada suffered a disappointing shutout in Seattle at the World Cyber Games this weekend, but that didn't stop most of the members of Team Canada from having a great time at the international video gaming...
|
|
Recent WebProNews Articles |
Google Is Weak Because It Is Strong Google's stock closed last week at $637.39, Wall Street thinks Google's third quarter earnings announcement may come in 50 cents higher per share than last quarter, the company gets two-thirds of the web searches...
You Didn't Read This In The Newspaper Newspaper publishers have retreated to a local focus that gives them the best chance of retaining subscribers and favorable advertising rates. It's meant something...
Gmail Storage Ticks Upward, Lags Yahoo, AOL Google has given the storage counter for Gmail a little boost to its spin, but believe it or not they could be doing more. Not very long ago, storage on web-based email measured in the megabytes, and not very many...
|
|
|
10.15.07
ColdFusion 8 Drop Shadow Example
By Raymond Camden
I'm definitely not the first person to do this - but I've been itching to do drop shadows ever since I started playing with ColdFusion 8's new image functionality.
My UDF is rather simple. It takes an image and duplicates it. It fills the canvas with white - and than adds an offset black square the same size as the original image. It does a blur, and then pastes on the original image.
That by itself isn't too interesting, but what was interesting is why I had to duplicate the original image. When I first wrote the code, I simply used imageNew. However, whenever I tried to imageOverlay the original image onto the new one, I got:
Overlay operation requires the two sources to match in number of bands and data type.
Stumped - I dumped imageInfo on both. I wasn't sure what bands meant - but colormode_type on my original image was "ComponentColorModel" ,and the value in my new image made from scratch was "PackedColorModel". That made as much sense to me as arithmetic would make to Paris Hilton. So for the heck of it, I just tried imageNew using ARGB. I figured grayscale wouldn't work. Using ARGB didn't help at all.
So does anyone know how you would make an image from scratch that would work with a (as far as I know) average JPG?
Cost Effective Website and Network Monitoring IPCheck Server Monitor - Free Download |
|
The code is pasted at the very bottom. Let me show some examples of the output. First the original image.
Writing PHP is hard!
Now to make the drop shadow:
Continue reading this article.
About the Author:
Raymond Camden, ray@camdenfamily.com
http://ray.camdenfamily.com
Raymond Camden is Vice President of Technology for roundpeg, Inc. A long
time ColdFusion user, Raymond has worked on numerous ColdFusion books
and is the creator of many of the most popular ColdFusion community web
sites. He is an Adobe Community Expert, user group manager, and the
proud father of three little bundles of joy.
|
|