Thumbnails > The Cropping option (?) Thumbnails > The Cropping option (?)
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Thumbnails > The Cropping option (?)

Started by Rodinou, October 15, 2003, 04:12:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rodinou

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 ?

Tarique Sani

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...
SANIsoft PHP applications for E Biz

hyperion

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
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Rodinou

I have this on the Fantasya.Net's code


# 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