Defining the size of intermediate pictures. Defining the size of intermediate pictures.
 

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

Defining the size of intermediate pictures.

Started by xplicit, July 16, 2006, 01:25:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xplicit

Hello I've stumbled into a problem and I did several things to programm it but can't get it working...

Here's the thing. I want to set the intermediate pictures as a background in a table and cover the table with a transparent gif image. So far so good and it's working. But..... to get if fully working I have to know the intermediate picture size otherwise the table will schrink to a 1 pixel height image.

Normally the intermediate picture itself just streched the table with the needed not hardcoded width and height to fit but now the picture is in the background so it wont strech... and the size is now the size of the transparant gif...

It there a trick I can use to determine the intermediate file dimensions? the most dificutl part is the height... how can i determine that..?
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

xplicit

Thanx for your very quick and helpfull response!!!

I think that can precisely do wath I want :)

Will programm further and let you know how it worked out :)

Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

xplicit

Ok Fixed it :)

Probably not the shortest code but well it's working :)


$hostserver  = $_SERVER['HTTP_HOST'];
$_REAL_SCRIPT_DIR = realpath(dirname($_SERVER['SCRIPT_FILENAME']));
$_REAL_BASE_DIR = realpath(dirname(__FILE__));
$_MY_PATH_PART = substr( $_REAL_SCRIPT_DIR, strlen($_REAL_BASE_DIR));
$pathpart = $_MY_PATH_PART ? substr( dirname($_SERVER['SCRIPT_NAME']), 0, -strlen($_MY_PATH_PART) ) : dirname($_SERVER['SCRIPT_NAME']);
$prefixserver = "http://";
$samen = "/".$picture_url;
$adresnaarfoto  = $prefixserver.$hostserver.$pathpart.$samen;
$sizer  = getimagesize($adresnaarfoto);
$intermediatesize = $sizer['3'];


Thnx for the support!

If somebody knows a shorter version  to get to the same result please let me know. But for know I'm off to bed :)
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.