Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

thumbnail class - yikes, snags (headers without tags)

images php coding issues or problems here.

Moderators: macek, egami, gesf

thumbnail class - yikes, snags (headers without tags)

Postby pootergeist » Wed Feb 05, 2003 10:41 am

the problem arises due to the ol' headers already sent doodar - which can obviously be gotten around by targetting the script with an <img src="script" technique.

somehow though, that defeats part of the object of a class, due to having to be called for every image tag, rather than call once, use many times. Also it would need some playing around to convert the $_GET variables to ones suitable for the create() call.

so... is it possible to create an image through scripting without having to target an external script through an image tag?

I have tried
<img src="/-/data:image-jpeg;base64,<?php
ob_start();
$a = new thumbnail;
$a->create('params...')
echo base64_encode(ob_get_contents()).'" />';

which outputs the raw data as opposed to a nice image.

If I simply run class_thumb.php with apended lines
$a = new thumbnail;
$a->create('params.....');
it works fine - outputs the reduced image.
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron