Raised This Month: $ Target: $400
 0% 

php help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Extremeone
Senior Member
Join Date: Jan 2005
Old 05-05-2005 , 10:52   php help
Reply With Quote #1

okay so i have this code that i got off a website:
Code:
<?php
  $original = imagecreatefrompng("http://miniprofile.xfire.com/bg/sf/type/0/extremeone.png");
  header ("Content-type: image/png");
  //Original is 440x110
  $modified = imagecreatetruecolor(440, 85);
  imagecopy($modified, $original, 0, 0, 0, 26, 440, 85);
  imagepng($modified);
  imagedestroy($original);
  imagedestroy($modified);
?>
heres wat it looks like:

anyway i was wondering if there is a way to shrink images with php
you know instead of taking a certain part you just shrink the whole thing by 50%........
is this possible??????
Extremeone is offline
L1nuxm4ster
Member
Join Date: Dec 2004
Old 05-05-2005 , 16:00  
Reply With Quote #2

If you have PHP compiled with the latest GD version that supports both jpg and gif images, it will allow you to resize them. It can auto resize gif and jpg banners based on the allowed settings that you configure. It can also create a thumbnail with a link to the full size picture.
__________________
"Linux is simple. It just takes a genious to understand it's simplicity"
L1nuxm4ster is offline
Send a message via AIM to L1nuxm4ster Send a message via MSN to L1nuxm4ster Send a message via Yahoo to L1nuxm4ster
Extremeone
Senior Member
Join Date: Jan 2005
Old 05-06-2005 , 00:47  
Reply With Quote #3

Quote:
Originally Posted by L1nuxm4ster
If you have PHP compiled with the latest GD version that supports both jpg and gif images, it will allow you to resize them. It can auto resize gif and jpg banners based on the allowed settings that you configure. It can also create a thumbnail with a link to the full size picture.
........
huh?
PHP Compiled?
GD Version?
I just use a free webhoast with php already installed...
i was wondering if it was something in here that i could change to make it resize them instead of taking a piece out:
Code:
$original = imagecreatefrompng("http://miniprofile.xfire.com/bg/sf/type/0/extremeone.png");
  header ("Content-type: image/png");
  //Original is 440x110
  $modified = imagecreatetruecolor(440, 85);
  imagecopy($modified, $original, 0, 0, 0, 26, 440, 85);
Extremeone is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-06-2005 , 01:28  
Reply With Quote #4

440, 85
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Extremeone
Senior Member
Join Date: Jan 2005
Old 05-06-2005 , 09:00  
Reply With Quote #5

Quote:
Originally Posted by v3x
440, 85
NOOOO
that doesent shrink it
it cuts out the smaller size from the picture
and 0, 0, 0, 26 is the offset
is there something else i can put in there to shrinkit?
Extremeone is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 05-06-2005 , 14:32  
Reply With Quote #6

if you could find a copy of invision power board 2.0.0 I believe, they have a thumbnail function that you could possibly look at and learn from.
BigBaller is offline
f1del1ty.oXi
Veteran Member
Join Date: Nov 2004
Old 05-06-2005 , 16:32  
Reply With Quote #7

If you want 2.0.0, I have a copy of it. And it's not illegal, 2.0.0 was the FINAL version they allowed to be used freely, then when they upgraded you had to pay. Just PM me and I'll give you the link.
__________________
f1del1ty.oXi is offline
manorastroman
Senior Member
Join Date: Oct 2004
Old 05-06-2005 , 19:51  
Reply With Quote #8

of course you tell me that just after i finish setting up my 1.3
__________________
manorastroman is offline
Send a message via AIM to manorastroman Send a message via MSN to manorastroman Send a message via Skype™ to manorastroman
f1del1ty.oXi
Veteran Member
Join Date: Nov 2004
Old 05-06-2005 , 19:52  
Reply With Quote #9

__________________
f1del1ty.oXi is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-07-2005 , 12:03  
Reply With Quote #10

Quote:
Originally Posted by BigBaller
if you could find a copy of invision power board 2.0.0 I believe, they have a thumbnail function that you could possibly look at and learn from.
LOL, good luck!
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode