fetch big picture. fetch big picture.
 

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

fetch big picture.

Started by niks_007, September 04, 2007, 09:14:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

niks_007

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.

JCphotog

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

therightpic

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.

niks_007

hi..

Quote from: therightpic on September 05, 2007, 03:46:28 PM
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