Utility Function: ImageBlurMore()

OK, so up until now you probably can guess that the functionality I'm working on has something to do with drawing or moving a shape since I've posted math rounding functions and functions dealing with geometric positioning. Lets throw you a curve-ball: I also need the following function. What happens when ImageBlur(image, 10) just isn't enough? Well you're going to need to blur the image more!

 


Transparent Rounded Corners for the Masses

Ok, so a late night of coding here… I should have been in bed like 2+ hours ago, but its all worth it because I've got it working: fully transparent rounded corners on your images. Just hit "more" to see the code.

 

Warcraft Killed the Programming Star

Not that I'm really a star, but its true... getting back into playing World of Warcraft has curbed the time I spend tinkering with stuff in the evenings. Expect more about Image.cfc soon though and the extended version which has my current batch of image effects and a few new ones.

 

Rounded Corners Code

A while back I mentioned that I had come up with some code to do rounded borders, but that I was holding it back as part of a larger release. Since then, I've not gotten as far with some of my other code ideas, and since I was asked nicely, I figured I'd release the code for rounded corners.

 

Image Object

Perhaps I've been overwhelmed by my recent reading on object-oriented design, but as I said in my last post, I thought an object that offered all the CF8 Image functions as methods of that object would be kind of nice. Despite the stumbling block of not being able to use onMissingMethod and Evaluate to create a solution, I applied a little brute force and hand coded it all. You can download it here:

Image.cfc

Version 0.3
  • Corrected for ImageDrawQuardicCurve() documentation errors (takes 7, not 9 as listed here).
  • Added masks to allow Yes/No and On/Off inputs to be passed as simple boolean values (true/false)

I've tested the basics, but I wont guarantee that it is completely bug free. When I find additional bugs, I'll put out new versions. I'll also be using this object as the bases for a new EffectsImage.cfc that will hold things like the mirroring effect.

 

Evaluate()'ing a Function with "Nothing" Returned

So, I'm plugging away at some cool image effect stuff, and I decided that it would be nice to wrap all my image functionality into an object, and that it would be cool to try CF8's new onMissingMethod function to implement the built in function set as methods of this new object. The overall effect would be really nifty and fun to use, but I hit a big old snag; the Evaluate() function fails with "nothing" returned.

 

More Entries

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a C# .Net developer by day, a ColdFusion guru by night, and all around Javascript fanatic. Stay right here to read my technical posts as I grapple with mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web. Learn more about me.

Post a job. Find one. authenticjobs.com

Interested in becoming a sponsor? Contact me.