PHPBuilder - Getting width/hight of an EPS



RSS Twitter
Snippets Graphics

Getting width/hight of an EPS

by: Nikolas Hagelstein
|
August 29, 2002

Version: 0.0.1

Type: Sample Code (HOWTO)

Category: Graphics

License: GNU General Public License

Description: This snipped should be able to detect width and height of an EPS (at least Photoshop EPS).



#$imgdata[1] contains width /[2] contains height 


$fp=fopen ($img, "r");
$buffer = fgets($fp, 4096);
if (preg_match("/ImageData:[^\"]*\"/",$buffer ,$imgdataln)) {			  
  $imgdata=split(" ", $imgdataln[0]); 
}
fclose ($fp)

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Nikolas Hagelstein

Comment:



Comment:

(Maximum characters: 1200). You have characters left.