forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: Rodinou on October 15, 2003, 04:12:34 pm

Title: Thumbnails > The Cropping option (?)
Post by: Rodinou on October 15, 2003, 04:12:34 pm
Look at
http://www.fantasya.net

It's my site about fantasy ( /!\ WARNING POPUP ADULT CONTENT AT THE BEGINNING > to pay bandwidth, sorry :( /!\)

I find (it's not the taste of all ... but ...) that CROPPED thumbnails are more esthetic : is it possible to have the option ?
Title: Thumbnails > The Cropping option (?)
Post by: Tarique Sani on October 15, 2003, 04:47:14 pm
Hey - I had not looked at Fantasya lately BUT seeing it I recalled that it was my one time favourite. Great work

As for the cropped thumbnail - I have made a provision that some future coder can put in a mod for replacing thumbnail...

Anyone willing to take up this one?

I also have somewhere a combination of PHP + JS which allows one to crop pictures right in browsers - this I promise to dig out if someone is willing to code this...
Title: Thumbnails > The Cropping option (?)
Post by: hyperion on October 15, 2003, 04:57:42 pm
Quote from: "Tarique"

I also have somewhere a combination of PHP + JS which allows one to crop pictures right in browsers - this I promise to dig out if someone is willing to code this...


Put it up on the dev branch, or PM me.  I'll take a look at it.

-Hyperion
Title: Thumbnails > The Cropping option (?)
Post by: Rodinou on October 15, 2003, 05:01:07 pm
I have this on the Fantasya.Net's code

Code: [Select]

# Upload de la vignette

if ($pics!="none") {

#   copy($pics,);

   

         $size=getimagesize($pics);

                 

         $ratio1=$size[0]/75.0;

         $ratio2=$size[1]/75.0;

                 $ratio=min($ratio1,$ratio2);

   

         $width=ceil($size[0]/$ratio);

         $height=ceil($size[1]/$ratio);

         $x=floor(($width-75)/2);

         $y=floor(($height-75)/2);

             

         $commande='/usr/bin/X11/convert -geometry '.$width.'x'.$height.' -crop 75x75+'.$x.'+'.$y.' '.$pics.' ../images/pics/gal_'.$gae_ref.'.jpg';

         exec($commande);

   

}


I use as you can see ImageMagick