The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
]
Code:
<br /> <b>Fatal error</b>: Call to undefined function: imagecreatefromjpeg() in <b>/blabla/sig.php</b> on line <b>27</b><br /> Code:
$im = imagecreatefromjpeg($logos[$logo]); |
#12
|
||||
|
||||
]the code I use right now looks like this: (just making sure we are talking about same script and same things)
Code:
<?php $logodir = "http://www.somewhere.com/pics/"; header('Content-Type: image/jpeg'); header('Content-Disposition: inline; filename=file.jpg'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Pragma: no-cache'); $logos = array ( $logodir . "1.jpg", $logodir . "2.jpg", $logodir . "3.jpg", $logodir . "4.jpg", $logodir . "5.jpg", $logodir . "6.jpg" ); function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } srand(make_seed()); $logo = rand(0, count ($logos) - 1); $im = imagecreatefromjpeg($logos[$logo]); Imagejpeg($im); imagedestroy($im); ?> |
#13
|
||||
|
||||
hmm, look here:
http://www.php.net/manual/en/functio...tefromjpeg.php its a standartfunction in php. something with your php-installation seems not to be ok... |
#14
|
||||
|
||||
]I have tried it on 2 servers now... one in Germany and one in Holland. Both are installed by 2 difefrent peoples. Same result - doesn't work
|
#15
|
||||
|
||||
]by the way... I don't blame you or something... I really appreciatte all your help... but I can't see meaning of creating an image from an EXISTED image, show it and then destroy it...
why not just push the existed image? |
#16
|
||||
|
||||
have tried it at my server, works perfect:
|
#17
|
||||
|
||||
Quote:
hmm, maybe your servers have disabled this function, have tested it on another server too and works perfectly too |
#18
|
||||
|
||||
]ok... I got my friend to use it on his server (3rd server I'm trying to get it workk on).
It works! yay! now the problem is : all 6 pics I used was 25-30kb in size in perfect quality. After randomizing by this script all I get is blurred, low quality picture 8-9kb in size... are there any ways to be sure that qulity at the end is the same as in the start? btw : thanx for this workaround |
#19
|
||||
|
||||
]Anyway, here's updated version of my script that should at the output generate progressive JPEG with 100% quality.
Code:
<?php /* Location of the pictures */ $logodir = "http://www.mpc.turbohost.net/wolfsig/"; /* Type of output (for browsers) */ header('Content-Type: image/jpeg'); /* No caching (for newer browsers) */ header('Cache-Control: no-store, no-cache, must-revalidate'); /* No caching (for older browsers) */ header('Pragma: no-cache'); /* Making an array with all pictures */ $logos = array ( $logodir . "1.jpg", $logodir . "2.jpg", $logodir . "3.jpg", $logodir . "4.jpg", $logodir . "5.jpg", $logodir . "6.jpg" ); /* explode = explode an array */ /* microtime = return current UNIX timestamp with microseconds */ function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } /* explode = seed the random number generator */ srand(make_seed()); /* rand = seed the random number generator */ /* count = count elements in a variable */ $logo = rand(0, count ($logos) - 1); /* Create image from predefined variables */ $im = ImageCreateFromJPEG($logos[$logo]); /* Output image as a progressive JPEG */ imageinterlace($im,1); /* Output image with 100% quality */ Imagejpeg($im,'', 100); /* Destroy picture on the server */ imagedestroy($im); ?> As always... Script is working but there's some problems with it : generated pictures are not in the same quality as input pictures. |
#20
|
||||
|
||||
forget it... I'm using other script
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|