PHP halftone generator