![]() |
Ok, i played around with it. Please notice that i know nothing about PHP, but i was able to track down the Problem:
If i change: if ($width_factor > $height_factor) { $nw = round($w / $width_factor); $nh = round($h / $width_factor); } to: if ($width_factor > $height_factor) { $nw = 400 ; $nh = round($h / $width_factor); } it works. 500,600,1000 -> Anything bigger 400 don?t. I guess that for some reasons ImeageCreateTrueColor don?t like big numbers.. but i have no Ideas why. The image i used was a Standart jpg with 1600*1200. Size played no role. I would really apreciate your help on this topic, as i will definitly extend this genius hack ! What i want to add: -Other extension (.jpeg,.jpe ...) -File size Does anybody know if GDlib can read EXIF Data ? (Yes my English sucks ;)) |
Sorry. It works with 450 and 500. But 600 is to mutch. This makes me sick.
(And it is not "ImageCopyResampled". The following line works just fine: ImageCopyResampled($ni,$im,0,0,0,0,1000,$nh,$w,$h) ; ) |
If somebody else has the same Problem: As a workaround i use:
$width_factor = $w / 500; $height_factor = $h / 500; if ($width_factor > $height_factor) { $nw = round($w / $width_factor); $nh = round($h / $width_factor); } else { $nw = round($w / $height_factor); $nh = round($h / $height_factor); } $ni=imagecreatetruecolor($nw,$nh); ImageCopyResampled($ni,$im,0,0,0,0,$nw,$nh,$w,$h); UnsharpMask($ni); |
And i found a Bug: If more than one Image is resized, the script returns an error 500. However the first one is still uploaded.
Anybody else with this error ? |
thanks mini2, installed and working on my vBulletin Version 3.0.7 Forum. :classic:
|
Great! this hack work for my bloggers forum. There is other similar hack too, but it does not work. :)
Thank you! |
I started to install this hack on 3.0.3
but in the functions_file.php I could not find the section that says: Code:
@unlink($attachment); |
for attachments is it possible for them to be clikabkle?
|
Quote:
|
Quote:
I did some more checking and found that .JPG will darken but .GIF doesn't. So use paint shop or photo shop to change from a JPG to GIF, this should solve this problem. If it does, please post so other will know if it works. |
Excellent hack! *clicks install* Does exactly what is says on the tin :-)
Just a quick question tho, do the 'original' large files automatically get deleted off the server or do we have to do that manually? Also a note for people using the attachment resizer, you have to 'increase' the sizes in your ACP to let the larger files get uploaded to then be resized. :-) |
Sometimes the images shown (JPG) are a bit dark... anyway to get them lighter? :-/
Most users wont know how to conver to gif, so thats not any option really... |
Uploaded all as per instructions,doesn't seem to be working
Do you need safe mode turned off for this to work... Uploaded the 2 hacks,no errors or anything but doesn't work :ermm: Edit: Got the avatar hack working,slight problem same as another user, the pic is slightly darker :rolleyes: |
Thanks for that wiked hack
|
anyone know if you can intergrate this into vb gallery?
|
Excellent hack.
I see a couple of small problems with it though:
I've fixed these problems, and also did some code cleanup. You can uncomment error_log() lines and change email to your actual address to get some idea how this hack performs. Code:
// HACK: auto resize uploaded images |
kmike,
nice fixes. has anyone tested this yet on 3.5 RC2? |
I am getting this error when attempting the Profile Pic modification:
Fatal error: Call to undefined function: unsharpmask() in /home/website/forums/includes/functions_upload.php on line 294 EDIT: Nevermind added require_once('./includes/functions_image.php'); and it works! |
Can this one please be ported to vB3.5? :)
|
A port to 3.5 would be VERY useful.
|
Quote:
|
As I noted in the other thread, 3.5.x has built in Avatar and Profile Pic resizing, so these hacks are now obsolete. ;)
|
As I noted in the other thread, 3.5.x has built in Avatar and Profile Pic resizing, so these hacks are now obsolete. ;)
|
Quote:
|
I still have yet to find a hack that will automatically resize attachments for version 3.5.xxx.
Anyone know of one out there???? |
Hi,
Can this hack also be used for VB 3.5.3? Thanks Reg |
It's gone. :(
Anybody know if there is a new one that resizes automatically? users are whining... lol |
All times are GMT. The time now is 04:53 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|