Jump to content

Archived

This topic is now archived and is closed to further replies.

cyber-drugs

Image cropping when should scale

Recommended Posts

http://cyber-lane.com/Clients/Projects/1/2...t/PC/images.php

 

The above image is being cropped when it should be re-sizing, can someone help me with the code to fix it?

 

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]

[span style=\"color:#0000BB\"]<?

$flag [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]imagecreatefrompng[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\'Graphics/Backgrounds/africa.png\'[/span][span style=\"color:#007700\"]);

[/span][span style=\"color:#0000BB\"]$mask [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]imagecreatefrompng[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\'Graphics/Nodes/shapes.png\'[/span][span style=\"color:#007700\"]);

 

[/span][span style=\"color:#0000BB\"]imagealphablending[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$flag[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]1[/span][span style=\"color:#007700\"]);

[/span][span style=\"color:#0000BB\"]imagealphablending[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$mask[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]1[/span][span style=\"color:#007700\"]);

 

[/span][span style=\"color:#0000BB\"]imagecopy[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$flag[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$mask[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]200[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]200[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]135[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]101[/span][span style=\"color:#007700\"]);

 

[/span][span style=\"color:#FF8000\"]//------------------------------------

 

[/span][span style=\"color:#0000BB\"]$mask [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]imagecreatefrompng[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\'Graphics/Nodes/shapes2.png\'[/span][span style=\"color:#007700\"]);

 

[/span][span style=\"color:#0000BB\"]imagealphablending[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$flag[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]1[/span][span style=\"color:#007700\"]);

[/span][span style=\"color:#0000BB\"]imagealphablending[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$mask[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]1[/span][span style=\"color:#007700\"]);

 

[/span][span style=\"color:#0000BB\"]imagecopy[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$flag[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$mask[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]400[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]400[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]135[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]101[/span][span style=\"color:#007700\"]);

 

[/span][span style=\"color:#FF8000\"]//------------------------------------

 

[/span][span style=\"color:#0000BB\"]$final [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]imagecreatefrompng[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\'Graphics/PDA.png\'[/span][span style=\"color:#007700\"]);

[/span][span style=\"color:#0000BB\"]$mask [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$flag[/span][span style=\"color:#007700\"];

 

[/span][span style=\"color:#0000BB\"]imagealphablending[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$final[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]1[/span][span style=\"color:#007700\"]);

[/span][span style=\"color:#0000BB\"]imagealphablending[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$mask[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]1[/span][span style=\"color:#007700\"]);

 

[/span][span style=\"color:#0000BB\"]imagecopy[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$final[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$mask[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]400[/span][span style=\"color:#007700\"],[/span][span style=\"color:#0000BB\"]300[/span][span style=\"color:#007700\"]);

 

[/span][span style=\"color:#FF8000\"]//------------------------------------

 

[/span][span style=\"color:#0000BB\"]Header[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"Content-type: image/jpeg\"[/span][span style=\"color:#007700\"]);

[/span][span style=\"color:#0000BB\"]imagepng[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$final[/span][span style=\"color:#007700\"]);

[/span][span style=\"color:#0000BB\"]?>

[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

 

Many thanks. :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.