php jpeg/png support

Problems with the Windows version of XAMPP, questions, comments, and anything related.

php jpeg/png support

Postby cfranks » 23. September 2014 16:28

How do i recompile the php with the jpeg and png support.
cfranks
 
Posts: 1
Joined: 22. September 2014 22:55
Operating System: Windows

Re: php jpeg/png support

Postby iskono » 24. September 2014 21:17

this might help i guess
source :
http://php.net/manual/en/book.image.php
Code: Select all
<?php
// Create a test source image for this example
$im = imagecreatetruecolor(300, 50);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5,  'A Simple Text String', $text_color);

// start buffering
ob_start();
// output jpeg (or any other chosen) format & quality
imagejpeg($im, NULL, 85);
// capture output to string
$contents = ob_get_contents();
// end capture
ob_end_clean();

// be tidy; free up memory
imagedestroy($im);

// lastly (for the example) we are writing the string to a file
$fh = fopen("./temp/img.jpg", "a+" );
    fwrite( $fh, $contents );
fclose( $fh );
?>
User avatar
iskono
 
Posts: 6
Joined: 27. August 2011 03:49

Re: php jpeg/png support

Postby cmb69 » 24. September 2014 22:54

cfranks wrote:How do i recompile the php with the jpeg and png support.

No need to recompile PHP when you're using XAMPP 1.8.3-5 on Windows. JPEG and PNG support is already enabled for the GD extension.
User avatar
cmb69
 
Posts: 22
Joined: 18. October 2012 03:09
Location: Germany
Operating System: Windows 7 Home Premium


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 77 guests