News Feed
Jobs Feed
Sections




News Archive
feed this:

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

CodeGeekz:
Cropping Images in PHP Based on their Entropy
February 03, 2014 @ 11:25:42

On the CodeGeekz site there's a new post showing you how to use the Imagick extension and a custom library to crop images based on their entropy (keeping the "busiest" part of the image).

The need to resize and crop images in order to create thumbs, is a very common scenario for most websites. For example a blog like this one uses images in the content of the posts, images which at some point are used to create a thumb for the homepage. In most cases, the thumb's dimensions are not dynamic but are static throughout the website in order to better fit the template. This however creates a major problem when we try to automatically resize and crop our images in the desired dimensions.

He starts with an example of the normal kind of cropping based on a given height and width. He points out an issue with "smart cropping" and resizing the image with the cropping is done. Instead, he's made use of Imagick in his library to produce a better cropped image based on the parts of the image with the most entropy.

0 comments voice your opinion now!
crop image entropy busy resize smart tutorial

Link: http://codegeekz.com/cropping-images-entrop/

Jani Hartikainen's Blog:
The three types of programmers
August 13, 2009 @ 14:48:08

In this recent post from Jani Hartikainen he looks at the three different categories he sees developers fitting into - "smart-and-get-things-done", smart and "just a" programmer.

The other day I was thinking of programmer types. In a way, I think there are three kinds of programmers when looking at a high level [...] So how do you determine if a programmer goes into one of these categories?

The "just a programmer" is the developer that writes code because it's a better job with little passion. The "smart programmer" are talented developers but they miss the big picture things. The "smart and get things done programmer" can be the most ideal of the three - they're the ones with the vision and passion to really make great applications.

0 comments voice your opinion now!
types programmers smart justa get done


Ben Scholzen's Blog:
Writing powerful and easy config files with PHP-arrays
May 11, 2009 @ 12:05:45

Ben Scholzen has written up a post about how regular PHP arrays can be used as a native configuration option for your applications.

I was asked many times how I organize my config files, and my response was always the same, until some time ago when I switched began refactoring the codebase of my blog. [...] Looking at [the advantages of PHP config files], you may ask now why not everbody is using them. Well the problem mostly is that you cannot create extend-sections (when working with Zend_Config for example).

He compares an example of a method that, using a base config file with some "smarts", you can have it automatically pull in certain files and overwrite settings from the array inside. A sample "other config" file is also included, showing the definition of some PHP settings, resources and database information.

0 comments voice your opinion now!
configuration file array zendframework zendconfig smart base config


Brian Moon's Blog:
You have to be really smart to code PHP!
May 24, 2007 @ 10:27:00

Brian Moon has posted some thoughts about "the post" that Terry Chay recently wrote including comments on smart versus intelligent, object nonense, and funky function names.

So, if you are not smart, then stop coding PHP. Its a good thing that C developers are smart. They have to remember all those functions. Assembly language developers don't have to remember functions. I guess they are not smart?

Ok, that last paragraph was tongue in cheek. Knowing 3000+ functions does not make you smart. It means you have a good memory. I will take intelligence over smart or a good memory any day.

His comments on the "object nonsense" makes note of the difference between functions and methods and the function naming issue - well, he has "no solid defense" as they do make it difficult to learn the language and send some developers running back to the manual to make sure the parameter order is right each time.

0 comments voice your opinion now!
smart interlligence memory fucntion parameter method smart interlligence memory fucntion parameter method



Community Events











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


series opinion hack application performance framework introduction podcast database hhvm symfony2 security release facebook language install component package composer unittest

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