Posts Tagged 'Image'

how to convert image from BMP to JPG type in php

Posted by admin on December 11 2009 Add Comments

how to convert image from BMP to JPG type in php
Step – 1

PHP Code:
$upload_path = “your full upload path where image will store”;
if($_FILES['file']['type']==’image/bmp’)
{
$name=explode(’.',$_FILES['file']['name']);
$name=$name[0].”.jpg”;
$img = ImageCreateFromBmp($upload_path.$_FILES['file']['name']);
imagejpeg($img,$upload_path.$name); // Convert to jpg file
unlink($upload_path.$_FILES['file']['name']); // Delete BMP File
// Your Databse operation here
}

Step – 2
// Now Define function

PHP Code:
function ImageCreateFromBmp($filename)
{
$tmp_name = tempnam(”/tmp”, “GD”);
if(bmp2gd($filename, $tmp_name))
{
$img = imagecreatefromgd($tmp_name);
unlink($tmp_name);
return $img;
}
return false;
}
function bmp2gd($src, $dest = false)
{
if(!($src_f = fopen($src, “rb”)))
{
return false;
}
if(!($dest_f = fopen($dest, “wb”)))
{
return false;
}
$header [...]

Image to PHP Standalone Output

Posted by admin on December 11 2009 Add Comments

Image to PHP Standalone Output

By : Tarcísio Xavier Gruppi
This package can be used to generate a class to serve a list of images.
It is based on the original Image to PHP class originally written by Ben Yacoub Hatem.
Download :
http://www.ziddu.com/download/7363931/imagetophpso-2009-08-05.zip.html

Image to PHP

Posted by admin on December 11 2009 Add Comments

Image to PHP

By : Ben Yacoub Hatem
This class is meant to read all images in a specified directory and then generates a PHP class with functions that serve the headers and the data of such image files.
It is very useful when you want to distribute a small PHP package with images embedded in the PHP [...]

Image Cache System

Posted by admin on December 10 2009 Add Comments

Image Cache System

By : Daniel Kanaan
This package can be used to store and retrieve images in a MySQL database.
The images are cached in temporary disk files to avoid database access overhead.
It can store uploaded images keeping the original size or resized to a given width and height.
It can also create cache files in a given [...]

Image CAPTCHA

Posted by admin on December 10 2009 Add Comments

Image CAPTCHA

By : mithereal
This class implements CAPTCHA validation using a fixed list of images.
It retrieves images from a server side directory and displays obfuscated versions to the user along with radio buttons to let the user pick the one that corresponds to the right answer.
The class may also generate automatic thumbnails for each of the [...]

Create image for WAV file

Posted by admin on December 10 2009 Add Comments

Create image for WAV file

By : mfboy
This class can be used to draw a graph of the sound of a WAV file.
It opens a given sound sample file in the WAV format and extracts the variation of the volume of the sample over time.
The class renders an image that represents the sound sample wave form.
Download [...]

Image Nudity Filter

Posted by admin on December 10 2009 Add Comments

Image Nudity Filter
By : Bakr Alsharif
This class can be used to determine whether an image may contain nudity.
It analyses the colors used in different sections of an image to determine whether those colors match the human skin color tones.
As result of the analysis it returns a score value that reflects the probability of the image [...]

Image File Browser

Posted by admin on December 10 2009 Add Comments

By : Panos Kyriakakis
This class can be used to let the user browse and pick images stored in the server.
It uses an AJAX based user interface to avoid page reloading when the browsing display is updated.
Required external javascripts: prototype.js, scriptaculous library (scriptaculous.js,unittest.js,effects.js)
Download:
http://www.ziddu.com/download/7221937/ifb-2007-07-11.zip.html