News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mikko Koppanen's Blog:
Perspective transformations
February 05, 2009 @ 09:36:02

Mikko Koppanen is back to blogging with this new post today - it's a look at another example with ImageMagick. It shows how to distort an image but keep its perspective.

I took some time to actually understand the perspective transformations properly using the excellent ImageMagick examples (mainly created by Anthony Thyssen) as a reference. The basic idea of perspective distortion seems simple: to distort the control points to new locations.

His example uses a checkerboard as the image to manipulate and, based on an array of settings (source, destination) sets control points for the image to twist and turn from. The final output is echoed from a call to distortImage.

0 comments voice your opinion now!
perspective transformation imagemagick twist bendexample


Christian Stocker's Blog:
Profile XSLT transformations within PHP
April 30, 2007 @ 10:09:00

Christian Stocker points out a handy patch for the PHP XSLT functionality today - one that allows you to test to see where in the transformation the most time is spent.

Look no further than this patch to the PHP XSL extension. It uses the built in profiler of libxslt to get the information which template was called how many times and how much time was spent in them. It may help in improving the speed of your XSLT transformations, like a PHP debugger can help in profiling your PHP scripts.

Besides the link, he also includes a simple sample script that uses the setProfiling function to write out to a text file the stats of the transformation. He also includes a (very beta) patch to the libxslt functionality itself to make it easier to not only time the overall execution of the xslt, but also allows for timing of other individual templates that might be included.

0 comments voice your opinion now!
xslt transformation benchmark setprofiling patch download xslt transformation benchmark setprofiling patch download


Dikini.net:
Rewriting macros - the peculiar case of php
August 17, 2006 @ 07:29:04

On Dikiki.net today, there's a new post that's a continuation of a series (first post, second post) dealing with macro programming in PHP.

Without going into theoretical details, some of which are quite alien to me, I'll try to describe some of the challenges that pattern patching rewriting macros might pose for a language like php. After brief explanation what kind of a beast is this, I try to explore some of the finer points, which might cause problems. The intent of this post is to sketch a design and highlight some of the possible issues.

He breaks up the post into a few sections:

  • pattern matching rewrite only macros - a bird eye view
  • Transformation time
  • Basic/skeleton shapes and intermediate shapes
  • Code generation issues specific to php
  • Hygiene
  • A rough macro shape outline
  • Output/Status of the project
There are code examples (of how it should work) and explainations of the issues PHP would face to accomplish this goal.

1 comment voice your opinion now!
rewrite macro pattern match transformation skeleton generation hygiene rewrite macro pattern match transformation skeleton generation hygiene



Community Events





Don't see your event here?
Let us know!


framework list podcast threedevsandamaybe release community code developer series api wordpress bugfix application introduction interview project library language configure laravel

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework