Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Thumbnails > The Cropping option (?)  (Read 5334 times)

0 Members and 1 Guest are viewing this topic.

Rodinou

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • Tournicoti, Tournicota
    • http://www.sortons.net
Thumbnails > The Cropping option (?)
« 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 ?

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Thumbnails > The Cropping option (?)
« Reply #1 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...
Logged
SANIsoft PHP applications for E Biz

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Thumbnails > The Cropping option (?)
« Reply #2 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
Logged
"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

(http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png)

Rodinou

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • Tournicoti, Tournicota
    • http://www.sortons.net
Thumbnails > The Cropping option (?)
« Reply #3 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
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.