|Last Updated||Ratings||Unique User Downloads||Download Rankings|
|2009-05-26 (6 years ago)||Not enough user ratings||Total: 730||All time: 4,283 This week: 1,049|
|easyimagedb 1.3||GNU General Publi...||3||Databases, Graphics|
This package can be used to manipulate images stored in files or in a MySQL database.
Bit of explanation, mostly straight forward. Errors: 1 No image in memory. 2 Duplicate exists. 3 Database registration fail. 4 Temp folder is not writable. 5 GD library could not create image. Functions: open(image_path) Open image from file. gif png or jpeg/jpg formats. fetch(image_id) Fetch image data from mysql database. Must have $db loaded. load() Load the image data with GD library of PHP. unload() Unload image GD resource. destroy() Resets all class variables back to empty. Same as loading Image class a new. save(filename, image_mime_type, permissions) Save an opened image or if the GD loaded one to any of the gif jpeg or png formats. convert(image_mime_type) Convert image bonary data between gif png and jpeg. Must be loaded with GD. Please set the temporary directory . register() Register the opened image data into mysql database. show(image_mime_type) Displayed the opened image on screen. If it is loaded in GD, output(image_mime_type) will run instead, the mime type maybe added to overwrite original. output(image_mime_type) Display the GD loaded image. Provide mime type to overwrite original. getwidth() Get width of the image loaded with GD. getheight() Get height of the image loaded with GD. resizetoheight(height) Resize the GD loaded image proportionaly by height. resizetowidth(width) Resize the GD loaded image proportionaly by width. scale(scale%) Scale the GD loaded image size by percent. resize(width, height) Resize the GD loaded image to teh given size. Examples: To simply display an image from mysql database and display: include('image.php'); (include both image and sql classes) include('sql.php'); $image = new Image; (initialize the image class) $image->db = new SQL; (initialize mysql class to get connection and control functions inside image class) $image->fetch(82); (we want image with teh id of 82 or any other) $image->show(); (display image on screen) To open an actual file and display: include('image.php'); (include the image class, dont need sql if we are not planing on using it) $image = new Image; (initialize the image class) $image->open('phplogo.gif'); (open it up from file) $image->show(); (display image on screen) MySQL database table: Tip: The mysql class is not necesery if you are not planning on using fetch() and register(), they are the only functions that need the sql class.
|Version Control||Unique User Downloads||Download Rankings|
|This week:||0||This week:||1,049|