Maps – Stripes / Generative Art
Generative Art (PHP, SVG)
Starting material is landscape photos, which are converted into stretched strips. Each image consists of 10 photo motifs. Arranged by a random calculation of positioning, size, transparency, and rotation, the final product is a collage. The aesthetics here follows a principle of color contrasts and fine details of shapes on the other hand.
The SVG vector format is here is also handy for large prints.
Excerpt from the PHP script:
resizeImage($source, $width, $height, $blur, $bestFit, $cropZoom);
function resizeImage($source, $width, $height, $blur, $bestFit, $cropZoom)
{
//The blur factor where > 1 is blurry, < 1 is sharp.
// $imagick = new \Imagick(DIR . DIRECTORY_SEPARATOR . $source); // for local folder
$imagick = new \Imagick(realpath($source));
$imagick->resizeImage($width, $height, $blur, $bestFit);
$cropWidth = $imagick->getImageWidth();
$cropHeight = $imagick->getImageHeight();
if ($cropZoom) {
$newWidth = $cropWidth / 600; // 800 / 400 = 8
$newHeight = $cropHeight / 1; // 600/1 = 600
$imagick->cropimage(
$newWidth,
$newHeight,
($cropWidth - $newWidth) / 2, // 800-80/2 = 360
($cropHeight - $newHeight) / 1 // 600 - 600 / 1 = 600
);
$imagick->scaleimage(
$imagick->getImageWidth() * 800, // 3600
$imagick->getImageHeight() * 1 // 600
);
}
$timestamp = time();
$datum = date("d.m.Y-H.i", $timestamp);
// $dateiname = ‘test’.$datum.’.jpg’;
global $maxAnzahl;