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: fetch big picture.  (Read 4158 times)

0 Members and 1 Guest are viewing this topic.

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
fetch big picture.
« on: September 04, 2007, 09:14:09 am »

hi...
       my cpm fetch is fetching the thumbonail size pic. but i want to fetch 300x300 size pic. the display image size is set to 800x600.
       i want to fetch the resized image via cpm fetch. without making changes to existing normal size pic.

      i dont want to fetch 800x600 pic and resize it with width and height tag of html as the original size will reamin 800x600 only.

      any sugessions.
      looking for you help

Niks.
Logged

JCphotog

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 115
Re: fetch big picture.
« Reply #1 on: September 04, 2007, 05:22:26 pm »

I'm not an expert yet, but I was playing around with the options array yesterday...
http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html

Might be what you are looking for ... 'imagesize'=>'int'  then use imageheight or imagewidth

You can find an example of the $options array in one of the stickied topics here:
http://forum.coppermine-gallery.net/index.php?topic=35450.0
Logged

therightpic

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
    • TheRightPic
Re: fetch big picture.
« Reply #2 on: September 05, 2007, 03:46:28 pm »

Try something like this:

<?php
  $recentCpm = new cpm("whatever your path is");
      $options = array("imageattributes" => array("height" => "300", "width"=>"300"));
      $recentCpm->cpm_viewRandomMostViewedMediaFrom("" ,1,1, $options);
 
?>

Just so you know, though, if you take an 800x600 pixel image and have CpmFetch shrink it to 300x300 pixels you are going to end up with a bad looking image, it will be skewed.  It would actually need to be 300x250 or something like that.
Logged

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: fetch big picture.
« Reply #3 on: September 05, 2007, 06:32:04 pm »

hi..

Just so you know, though, if you take an 800x600 pixel image and have CpmFetch shrink it to 300x300 pixels you are going to end up with a bad looking image, it will be skewed.  It would actually need to be 300x250 or something like that.

you got me write. this is what i am looking for fetching a image and resizeing it with option array like height or width will degrade the quality of pic as well as consume same bandwidth as the 800x600 pic will take and wont be a good idea to put that image on site.

     As we know copermine can resize the image i want to resize the image and then display it automatically.

i hope there might be some way out to do that.

Niks

Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 15 queries.