Changing background colour of thumbnails

12 years 9 months ago #2455 by petermac
Hi,

I like the plugin very much and I have managed to use caption.txt files to provide translations of the image data; very cool plug in.

One thing I would like to do is change the colour of the background in the thumbnails - this is because the pictures are different sizes but I don't really want to crop them and it will look better.

As I understand it, the code that creates the background in showthumb.php is (for a jpg image):

$dst_img = imagecreatetruecolor($new_w, $new_h);

I have changed this so that it now reads:

$dst_img = imagecreatetruecolor($new_w, $new_h);
$red = imagecolorallocate($dst_img, 255, 0, 0);
imagefill($dst_img, 0, 0, $red);

As far as I can see, this should create a red background, rather than a black one. Unfortunately this doesn't work. Can anyone point me in the right direction?

Many thanks,

Pete

Please Log in to join the conversation.

12 years 9 months ago #2461 by Viktor
Please log in to see the response. Attention: You need a valid subscription to activate an account.

Kubik-Rubik Joomla! Extensions

Please Log in to join the conversation.

12 years 9 months ago #2716 by petermac
Replied by petermac on topic Aw: Changing background colour of thumbnails
Please log in to see the response. Attention: You need a valid subscription to activate an account.

Please Log in to join the conversation.

12 years 9 months ago #2717 by Viktor
Please log in to see the response. Attention: You need a valid subscription to activate an account.

Kubik-Rubik Joomla! Extensions

Please Log in to join the conversation.

12 years 8 months ago #2940 by andykoa
Replied by andykoa on topic Aw: Changing background colour of thumbnails
Please log in to see the response. Attention: You need a valid subscription to activate an account.

Please Log in to join the conversation.

12 years 8 months ago - 12 years 8 months ago #2941 by Viktor
Please log in to see the response. Attention: You need a valid subscription to activate an account.

Kubik-Rubik Joomla! Extensions

This message has an attachment file.
Please log in or register to see it.

Please Log in to join the conversation.

Time to create page: 0.207 seconds