thumbnail class - yikes, snags (headers without tags)

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

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
$a = new thumbnail;
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;
it works fine - outputs the reduced image.

Post Reply