>I am trying to create a piece of code that will create and display
>thumbnail image. When trying to send the image to a browser, I see
>binary data rather then an image. You can see the problem at
>www.dallypost.com/a/test.php
>
>The troubled cose for this page follows:
>
><?PHP

> print("<img src = $master_image_all_link>");

You can't have the IMG tag and the actual image output in the same script.

Put the IMG tag into an HTML file, and the image output into a JPEG file.

The JPEG file can't output *anything* except headers and image data.

Speaking of headers:

>  imagejpeg($dst_img, '', 50);//sends the image to the   browser

Right *BEFORE* this line, you need to do:

header("Content-type: image/jpeg");

Otherwise, the browser doesn't know it's a JPEG and has to guess.  It might
guess right.  It might not.

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to