[Typo3-dev] Suggestion for an image watermark extension
Martin T. Kutschker
Martin.no5pam.Kutschker at blackbox.n0spam.net
Sun Nov 28 11:18:46 CET 2004
Jeff Segars wrote:
> Boris,
> This feature was discussed last year (and earlier before that) and if I
> remember correctly, it was determined that this would be very difficult
> or impossible due to to the 256 color limitations of PHP GD. Doing it
> with ImageMagick only was not discussed, however.
Wasn't this about digital watermarks? They are supposed to be invisible.
Boris is talking about some kind of "stamp".
> Boris Senker wrote:
>
>> Those TYPO3 frames gave me an idea... hopefully you don't mind me
>> posting it here.
>>
>> Many sites aim to protect their images by printing a semi-transparent
>> 'something' over the image - a logo, or a site name usually.
I have done something like this for a customer.
The point is to decide when an image ha to be "stamped". For simplicity
we only added the logo for popus and extended only SC_tslib_showpic.
Though to position the logo I had to change class.t3lib_stdgraphic.php:
// added optional geometry
function combineExec($input,$overlay,$mask,$output,$geometry='') {
if (!$this->NO_IMAGE_MAGICK) {
if ($geometry) $geometry = "-geometry $geometry ";
$cmd = $this->imageMagickPath.$this->combineScript.
' -compose over '.$geometry.$this->wrapFileName($input).
' '.$this->wrapFileName($overlay).' '.$this->wrapFileName($mask).
' '.$this->wrapFileName($output);
$this->IM_commands[] = Array ($output,$cmd);
exec($cmd);
}
}
Masi
More information about the TYPO3-dev
mailing list