Image Achieve & Crop then Link

Hi guys,
I’m new to php and my first question is elaborate I know but needed.

I need a script that _GET’s a Player Name and replaces a section in a URL and crops a section of the image to make a image that can be viewed as a .png file.

Example php call:
http://website.com/head.php?/image/20/MrVelocity.png

MrVelocity is the player
20 is the output image size
Cropped from http://website.com/PlayerSkin/MrVelocity.png

Just use the str_replace function

http://uk3.php.net/manual/en/function.str-replace.php

[php]$url = str_replace(“head.php?/image/20/”, “PlayerSkin”, “http://website.com/head.php?/image/20/MrVelocity.png”);[/php]

I need to crop a area of the image as well starting 8x, 8y to 16x, 16y & 8x, 40y to 16x, 48x making a new upscaled 20px, 20px image that is then produced by the .head.php?/20/MrVelocity.png

The ‘MeVelocity’ needs to be replaceable in C# program I have.

I also need to merge 2 images in one crop image like this:
from


to

+

output

I got it to crop & resize in C# so this isn’t needed now. If you have the answer and willing to share, please do as it might help others out but for now I have a working C# version.

Awesome,

And in C# the replace function is really easy, it’s right off the object.

[php]url.replace(“head.php?/image/20/”, “PlayerSkin”);[/php]

I needed to convert a image, not the URL. Read please.

Sponsor our Newsletter | Privacy Policy | Terms of Service