PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 24th, 2003, 11:16 AM
PHPme's Avatar
PHPme PHPme is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 319 PHPme User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 3 h 8 m 32 sec
Reputation Power: 6
Question Resize image ?!

Is it possible to resize an image before placing it on the page??

I am transferring data from a csv file onto a page as per this thread http://forums.devshed.com/t56265/s.html[/URL] . The image names in the column in the csv file are being used to place the relevant images on the page.

However, the images are of various sizes. Is there a way to check the width, and if it does not meet a specific size, then resize it (preferable with constraints on i.e. height to be resized correspondingly) to a specified width, and then place it on the page ??

And guidance, code, pseudo code.... is appreciated.

Thanks

Reply With Quote
  #2  
Old March 24th, 2003, 11:18 AM
rendy's Avatar
rendy rendy is offline
Moderator
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: London
Posts: 348 rendy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 17 sec
Reputation Power: 7
You could use GD http://www.php.net/manual/en/ref.image.php to resize the image, or if you want a quick botch job just use html image tags to force a size

Reply With Quote
  #3  
Old March 24th, 2003, 01:32 PM
heinrich's Avatar
heinrich heinrich is offline
digital sinner
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: sinner's land
Posts: 68 heinrich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 37 m 30 sec
Reputation Power: 6
Send a message via Yahoo to heinrich
you can use GD or if you want just resizing(but you will have the same space occupied on the harddisk and the image will load in the same time on the client) you can use getimagesize() and then use the values to resize using html tags.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Resize image ?!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT