- Posts: 1421
- Thank you received: 234
For reference only. Please use a different board for new questions
Using 404 caching for images
12 years 2 weeks ago #565
by redactie
Replied by redactie on topic Re: Using 404 caching for images
if you use the 404 caching for the image, or send the image thru for example timthumb, you can replace the images.
Another approach would be to embed the image in the html
Another approach would be to embed the image in the html
Please Log in to join the conversation.
12 years 1 week ago #611
by Jort
Replied by Jort on topic Re: Using 404 caching for images
Watermark is the word i was looking for. Could you create an example script for watermarking old cached images (images replaced by newer ones) ?
Please Log in to join the conversation.
12 years 1 week ago #615
by redactie
Replied by redactie on topic Re: Using 404 caching for images
Hi,
i'm not that familair with the GD library but using something like below should do the job to overlay the image with another. PNG transparent backgrounds.
Not sure whether or not you can achieve semi transparent with this or how to create embossed watermarks.
i'm not that familair with the GD library but using something like below should do the job to overlay the image with another. PNG transparent backgrounds.
Not sure whether or not you can achieve semi transparent with this or how to create embossed watermarks.
Code:
$overlay = imagecreatefrompng('overlay.png');
$owidth = imageSX($overlay);
$oheight =imageSY($overlay);
imagecopy($dst_img, $overlay, $new_w - $owidth , $new_h - $oheight , 0, 0, $owidth, $oheight);
Please Log in to join the conversation.
11 years 11 months ago #657
by fabio
Replied by fabio on topic Re: Using 404 caching for images
Hi All.
I have some problem saving the local images.
The folder was created but not the images.
This is my configuration for xhelpers.php:
<?php
define ('DF_IMAGE','concat(" www.mysite.com/img/",`feed_id`,"/",crc32..."-",`items_id`,".jpg ")');
And this is the configuration for img/index.php:
$usedb=true;
define ('DF_IMAGE','concat(" www.mysite.com/img/",`feed_id`,"/",crc32..."-",`items_id`,".jpg ")');
$search="#img/([0-9]+)/([0-9]+-)([0-9]+).jpg#";
Did i forget something?
Thank you
Fabio
I have some problem saving the local images.
The folder was created but not the images.
This is my configuration for xhelpers.php:
<?php
define ('DF_IMAGE','concat(" www.mysite.com/img/",`feed_id`,"/",crc32..."-",`items_id`,".jpg ")');
And this is the configuration for img/index.php:
$usedb=true;
define ('DF_IMAGE','concat(" www.mysite.com/img/",`feed_id`,"/",crc32..."-",`items_id`,".jpg ")');
$search="#img/([0-9]+)/([0-9]+-)([0-9]+).jpg#";
Did i forget something?
Thank you
Fabio
Please Log in to join the conversation.
11 years 11 months ago #658
by redactie
Replied by redactie on topic Re: Using 404 caching for images
did you change the lines 49-51?
Please Log in to join the conversation.
Time to create page: 0.572 seconds