FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Facebook like image resizer





imagefree
I need javascript based facebook like image re-sizer that allows user to upload an image and then crop the image and select custom portion of image and then the php script resizes and crops image according to specification of the user. Is there any such script available? or even something like http://mypictr.com/ will be fine too.

Please i need it urgent.
Thanks
jmraker
You could use a jQuery plugin that does the selection and can fill in form fields so they can be passed to a program that can crop and resize the image
http://odyniec.net/projects/imgareaselect/
http://keithics.com/blog/jquery/ajaxcrop-jquery-and-php-crop-tool
http://phpthumb.gxdlabs.com/
mahirh
you could make the thumb nailing system like this like this
thumb.jpg/index.php
Code:
<?php
$filename = $_GET["file"];
$percent = $_GET["tsize"];
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg($image_p, null, 100);
?>

it can be called like
Code:
<img src=/thumb.jpg?size=.2&file=./image/art.png" alt="Thumbnail" title="Thumbnail" border="0" />
jmraker
That assumes the image coming in is always a jpeg file, the getimagesize can tell you what kind of graphic it's reading, also the imagecreate functions can output image format errors that @ doesn't hide like if the filesize is zero, at least it does for me.

Code:
if ( ( list($width, $height, $type, $attr) = @getimagesize( $filename ) ) !== false ) {
   switch($type){
                case 1:
                    $image = @imagecreatefromgif($this->fileName);
                    break;
                case 2:
                    $image = @imagecreatefromjpeg($this->fileName);
                    break;
                case 3:
                    $image = @imagecreatefrompng($this->fileName);
                    break;
   }
}
imagefree
jmraker wrote:
You could use a jQuery plugin that does the selection and can fill in form fields so they can be passed to a program that can crop and resize the image
http://odyniec.net/projects/imgareaselect/
http://keithics.com/blog/jquery/ajaxcrop-jquery-and-php-crop-tool
http://phpthumb.gxdlabs.com/



thanks. this is what i wanted.
zimmer
mahirh wrote:
you could make the thumb nailing system like this like this
thumb.jpg/index.php
Code:
<?php
$filename = $_GET["file"];
$percent = $_GET["tsize"];
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg($image_p, null, 100);
?>

it can be called like
Code:
<img src=/thumb.jpg?size=.2&file=./image/art.png" alt="Thumbnail" title="Thumbnail" border="0" />


I found something useful on this code.

Credit for you my friend.

Very Happy
getmore
jmraker wrote:
You could use a jQuery plugin that does the selection and can fill in form fields so they can be passed to a program that can crop and resize the image
http://odyniec.net/projects/imgareaselect/
http://keithics.com/blog/jquery/ajaxcrop-jquery-and-php-crop-tool
http://phpthumb.gxdlabs.com/image resizer


this is great and help me a lot. thank you
codersfriend
I think facebook uses an image cropping tool
Marcuzzo
codersfriend wrote:
I think facebook uses an image cropping tool


They've got a custom version of PHP so it wouldn't surprise me if they've got more tools then just that running on their servers
Related topics
Image resizer
Coder for hire
Picture resizing software :?:
Lock this thread - Make thumbnails for 15 frihs$
recommended free software
Photo resizer?
Any program that modifies picture resolution?
----10 Frih$ Question Still Available Untill 5/18!----
Buen manipulador de imagenes
which is the best image resizer/resampler software?
How to resizer you images with VSO Image Resizer
How to Reduce an Images Size with php
Was this really necessary?
Image resizer
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.