CodeIgniter Forums
Image Library please - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Image Library please (/showthread.php?tid=8330)



Image Library please - El Forum - 05-14-2008

[eluser]RaiNnTeaRs[/eluser]
Hi all, why can I rotate or watermark my images ??
Or not all images can be rotated ?
Here is my code :
Code:
$this->load->library('image_lib');
if (strlen($_POST['WMT'])>0 )
{
    $config['source_image'] = './paint/'.$hh;
//$hh is my file name
    $config['wm_text'] = $wmt;
//$wmt is watermark text, eg : "COPYRIGHT"
    $config['wm_type'] = 'text';
    $this->image_lib->initialize($config);
            
    if (!$this->image_lib->watermark())
    {echo "WATERMARKING FAIL <BR />";}else{
    echo "WATERMARKING SUCCESS     <BR />";
            
    ;}
}
it always show WATERMARKING FAIL error message T-T


Image Library please - El Forum - 05-14-2008

[eluser]ontguy[/eluser]
I tried your code and worked.

If you add this to the failure message
Code:
echo $this->image_lib->display_errors();
what does it return?


Image Library please - El Forum - 05-14-2008

[eluser]RaiNnTeaRs[/eluser]
dunno. Or can someone here tell me what kind of image, can be "processed" ?


Image Library please - El Forum - 05-14-2008

[eluser]RaiNnTeaRs[/eluser]
Your server does not support the GD function required to process this type of image.
and the funny thing is, sometimes it works, sometimes it doesn .Thx anyway bro Big Grin


Image Library please - El Forum - 05-14-2008

[eluser]RaiNnTeaRs[/eluser]
can someone help me ? how to solve this matters ? My server doesnt support the GD, Im using xampp. or maybe other simple resolution ?


Image Library please - El Forum - 05-14-2008

[eluser]ontguy[/eluser]
I'm using XAMPP it worked with both, $config['image_library'] = 'GD2' and $config['image_library'] = 'gd';