General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 4th, 2003, 04:33 PM
mitchum mitchum is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: france
Posts: 13 mitchum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to mitchum Send a message via AIM to mitchum
Creating An Online Photo Album

Hi,
I'm learning the PHP, and I've test this tutorial. It's very good.
But I want to change a little this script.
For the thumbnails, there is this in gallerysizer.php:

DEFINE("RESIZE_WIDTH", 400);
DEFINE("RESIZE_HEIGHT", 300);

But I want to resize with the % of the widht.
Examples,
the picture is in 800 * 600
I want a thumbnail at 400*300 (So 50% of 800) and I want to the script count the proportion of the height.
SO, if I hava a pictu who are in 800*540, the script count, 400 for the height, and 50% of 540 for the width.

How I can DO?
Thank you very much

Reply With Quote
  #2  
Old October 4th, 2003, 11:57 PM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 366 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 59 sec
Reputation Power: 6
width divided by 2
height divided by 2

__________________
-- Jason

Reply With Quote
  #3  
Old October 5th, 2003, 04:17 AM
mitchum mitchum is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: france
Posts: 13 mitchum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to mitchum Send a message via AIM to mitchum
I'm not very good in PHP, can you explain me, the syntaxe.
Thank you very much

Reply With Quote
  #4  
Old October 5th, 2003, 11:20 AM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 366 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 59 sec
Reputation Power: 6
PHP Code:
 DEFINE("RESIZE_WIDTH", ( int )400 / ( int ));
DEFINE("RESIZE_HEIGHT", ( int )400 / ( int )); 


cheers

Reply With Quote
  #5  
Old October 5th, 2003, 11:31 AM
mitchum mitchum is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: france
Posts: 13 mitchum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to mitchum Send a message via AIM to mitchum
Hi,
Sorry, but I'm not explain very good.
I want to my thumbnails make 100*XXX and XXX is calculate with the ratio of the original picture

example:
picture make 800*600
thumbnail make 100*75

Who I can do?
Thank you very much.
Cheers,
Julien

Reply With Quote
  #6  
Old October 5th, 2003, 12:21 PM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 366 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 59 sec
Reputation Power: 6
PHP Code:
 $oSize getimagesize$image );

$x $oSize[0];
$y $oSize[1];

$adjustedX $x / ( int )2;
$adjustedY $y / ( int )2

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Creating An Online Photo Album


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 1 hosted by Hostway