PHP and GD can sharpen images by providing a matrix to
// create the image resource from a file
$i = imagecreatefromjpeg('otter.jpg');
// define the sharpen matrix
$sharpen = array(
array(0.0, -1.0, 0.0),
array(-1.0, 5.0, -1.0),
array(0.0, -1.0, 0.0)
// calculate the sharpen divisor
$divisor = array_sum(array_map('array_sum', $sharpen));
// apply the matrix
imageconvolution($i, $sharpen, $divisor, 0);
// output the image
Otter, before and after sharpening
Image courtesy Kevin Law
Posted in code
Tagged gd, image, php, sharpen
I’ve been using Zootool more and more recently to bookmark things I see on the web. The visual representation of saved items works better for me than Delicious and browser bookmarks are a non-starter these days.
Since the news of an API last week, I’ve been working on a little class wrapper – partly to hone my OOP skills and partly to support some great work by Bastian – and my class is now ready. I’ve named it ZooPHP.
$zoo = new ZooPHP($key, $secret);
That Web Guy had a problem with a design not being pixel perfect – only it turned out to be down to the theme he was using in Firefox. Bug?
In a post on forthcoming OS support for Orbicule, support for sending a message to an iphone and remotely playing a noise is mentioned. With the recent release of iPhone OS 3.0, these are the major selling factors Apple is using to entice users to MobileMe.
With all the reports over the approval process for apps being submitted to App Store, can Orbicule guarantee that their app will get through with these features? Apple previously refused to approve Podcaster on the grounds that it duplicated the functionality of the podcast section of iTunes.
External Files is a WordPress plugin which allows authors to insert code snippets from a file or url and automatically syntax highlights the code. Authors can specify the lines to show (or show the whole file/url) and override the automatic highlighting option.
To use, put your file path/url in the shortcode [external].
Click here to download External Files
In this tutorial I’m going to show you how to add an inline address lookup to your web forms using the PostcodeAnywhere webservice and the Yahoo! Connection Manager.
It’s been a week since I bought my first Mac, and i’m starting to install software that I knew I could only manage a week without – the first of which is a feedreader.
I use Newsgator online and therefore have a paid FeedDemon install on my Dell laptop, as these synchronise. This means I can read stuff in FeedDemon when i’m at my desk and Newsgator when i’m not without having to read the same items twice over.
This presents an obvious choice for a Mac feedreader – NetNewsWire (Lite). This also synchronises with Newsgator and so will save me a lot of time and effort during the daily catch-up.
I feel though that as Newsgator brought in each component, they have done the bare minimum to integrate it into the brand. Neither of the application-based readers under the Newsgator umbrella do any more than synch with Newsgator. Surely it would make more sense to have them support the same features and synchronise settings (ie flagged items, watch lists) with Newsgator instead of simply synchronising subscriptions. One step further would be to bring the same look and feel to both feedreaders – if iTunes can look the same on both Windows and Mac, then FeedDemon and NetNewsWire can.
RSS is a technology that is begging to be jumped on by the uneducated masses – as shown by the inclusion of feed readers in IE7 – but Newsgator don’t seem to have spotted this potential yet.
I was reading an article by Sam Gerstenzang entitled ‘Why Boot Camp is the Beginning of the End for Windows‘ (ok, so i’m four months behind on my feed-reading) and mostly I agree with his conclusion, that although Boot Camp enables more of the market to run Windows, it will eventually cause the downfall of Windows itsself.
One thing that occurred to me is that even when (if?) Boot Camp is to be included in the upcoming OSX Leopard, users still need to run the program within OSX to install Windows on a Mac.
If I were Steve Jobs, I’d plan to integrate Boot Camp into the wizard that OSX launches (to configure the machine) when a new Mac is first used by the end user. If the options available were…
- Customise OSX
- Customise OSX and install Windows
- Just install Windows, and set it as the startup
…Apple would be able to catch the market of users who will never want to leave Windows but do want a reliable and stylish machine. This wouldn’t necessarily speed up the downfall of Windows, but would bring Apple some of the market share currently owned by Dell, Lenovo and other large scale hardware manufacturers.