I purchased this script, and it seems to do everything they claim except I cant get it to output directly to the browser. Doesnt seem to recognise thats its an image?
I have sent 2 emails over the last 2 days that read.
Hi
PHP Version 4.4.2
GD Version bundled (2.0.28 compatible)
I am using DotScriptTM PHP Image Sorcerer.
I am having trouble outputting the browser. I can output a manipulated image to a file succesfully.
But when I out put the same image to the browser I get text that starts like
<html>
<head>
</head>
<body>
<?php
require 'sorcerer.class.php';
$img = new sorcerer; // instantiate the class
$result = $img->setfile('img/apples_three.jpg'); // set the target file
if ($result != IR_E_OK) // check for errors
die($img->last_error()); // if there are any errors, an appropriate message is displayed
$img->resize_fit_region(150, 150); // resize to best fit a region of 150x150
$result = $img->fill_buffer($img->get_image_type(), true); // render the resulting image
if ($result != IR_E_OK)
die($img->last_error());
$result = $img->flush_buffer(true, 'mycachedir/image_resized.jpg'); // write the image to the desired file
if ($result != IR_E_OK)
die($img->last_error());
else
echo "File written successfully.";
?>
</body>
</html>
The problem is that you try to output the image directly in the html page, which is incorrect. The php code should be in a different file, say "image.php" and then you will have an <img src="image.php"> in the html page.
So I must say, Well worth $5
There was no way a novice like me was going to get the results Im now getting without this kind of script.