Image Dimensions

RJM Programming - October, 2017

Thanks to ImageMagick

"; $prefix=""; if (isset($_GET['imagespec'])) { $imagespec = str_replace("//www.rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("//rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("http://www.rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("http://rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("https://www.rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("https://rjmprogramming.com.au/","/home/rjmprogr/public_html/",urldecode($_GET['imagespec']))))))); } else if (isset($_POST['imagespec'])) { $imagespec = str_replace("//www.rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("//rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("http://www.rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("http://rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("https://www.rjmprogramming.com.au/","/home/rjmprogr/public_html/",str_replace("https://rjmprogramming.com.au/","/home/rjmprogr/public_html/",urldecode($_POST['imagespec']))))))); } else if (1 == 2 && file_exists("/Applications/MAMP/htdocs/clouds.jpg")) { $imagespec = "/Applications/MAMP/htdocs/clouds.jpg"; } if ($imagespec != "") { $ximage=$imagespec; $topbit.=""; //if (strpos($_SERVER['SERVER_NAME'], "rjmprogramming.com.au") !== false) { exec($prefix . "identify " . $imagespec . " | sed '/ 8c /s// /g' | sed '/ 4c /s// /g' | sed '/ 16c /s// /g' | sed '/ 32c /s// /g' | sed '/ 256c /s// /g' | sed '/ 128c /s// /g' | sed '//\[ [1-9][0-9]*c[ \]/s// /g' | awk -F' ' '{ print $1 \">\" $0; }' | sed '/ /s//\<\/img\>\<\/a\> /' | sed '/\[[1-9][0-9]*\]/s///g' | sed '/^/s//!/g' | sed '/$/s//`/g' > /tmp/pnginfo.txt"); $topbit.=str_replace("imgsrc=","img style=width:45px; src=",str_replace("!","", str_replace("/home/rjmprogr/public_html/","http://www.rjmprogramming.com.au/", str_replace("/Applications/MAMP/htdocs/","http://localhost:8888/", @file_get_contents("/tmp/pnginfo.txt"))))))); //} else { //echo '/opt/local/bin/identify ' . $imagespec . ' > /tmp/pnginfo.txt'; //exec("/opt/local/bin/identify " . $imagespec . " | awk -F' ' '{ print $1 \">\" $0; }' | sed '/ /s//\<\/img\>\<\/a\> /' | sed '/\[[1-9][0-9]*\]/s///g' | sed '/^/s//!/g' | sed '/$/s//`/g' > /tmp/pnginfo.txt"); //$topbit.=str_replace("imgsrc=","img style=width:45px; src=",str_replace("!","", str_replace("/home/rjmprogr/public_html/","http://www.rjmprogramming.com.au/", str_replace("/Applications/MAMP/htdocs/","http://localhost:8888/", @file_get_contents("/tmp/pnginfo.txt"))))))); //echo file_get_contents("/tmp/pnginfo.txt"); //} } if ($ximage == "") $ximage="http://www.rjmprogramming.com.au/fillThisIn*YouGetIt*.*g*"; echo $topbit . "

        Image URL Specification:   "; ?>
Image NameImage TypeWidth x HeightMoreImage Bit ModeColour SpaceSize
",str_replace("`","
",str_replace("`","