Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 22. Nov 2024, 21:37

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Resize image height
PostPosted: 18. Jan 2009, 06:45 
Offline

Joined: 14. Jul 2008, 20:12
Posts: 7
The resize function works like a champ, it proportionally resizes pictures to 400px wide. The problem is verticals are too tall, I need the pictures to resize in a way that their dimensions don't exceed 400x300.

How?

Thanks! :D


Top
 Profile  
 
 Post subject:
PostPosted: 18. Jan 2009, 10:56 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
if you set 400 then then max height or width is 400.

if you like that the height is max 300 you would have to modify the resize function (resize_file) in the tfu_helper.php.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 18. Jan 2009, 21:03 
Offline

Joined: 14. Jul 2008, 20:12
Posts: 7
Awesome. Thank you!

For anyone else with this question, it was really simple.

Find this:
Code:
} else { // hochformat - this keeps the dimension between horzonal an vertical

     $height = $size;

     $width = ($height / $oldsizey) * $oldsizex;

}


and change it to this:
Code:
} else { // hochformat - this keeps the dimension between horzonal an vertical

     $width = $size;

     $height = ($width / $oldsizey) * $oldsizex;

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy