Changing background colour of thumbnails

12 Jahre 10 Monate her #2455 von petermac
Changing background colour of thumbnails wurde erstellt von 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

Bitte Anmelden, um der Konversation beizutreten.

12 Jahre 10 Monate her #2461 von Viktor
Bitte anmelden, um die Antwort zu sehen. Achtung: Eine gültige Subscription wird benötigt, um einen Account zu aktivieren.

Kubik-Rubik Joomla! Extensions

Bitte Anmelden, um der Konversation beizutreten.

12 Jahre 9 Monate her #2716 von petermac
Bitte anmelden, um die Antwort zu sehen. Achtung: Eine gültige Subscription wird benötigt, um einen Account zu aktivieren.

Bitte Anmelden, um der Konversation beizutreten.

12 Jahre 9 Monate her #2717 von Viktor
Bitte anmelden, um die Antwort zu sehen. Achtung: Eine gültige Subscription wird benötigt, um einen Account zu aktivieren.

Kubik-Rubik Joomla! Extensions

Bitte Anmelden, um der Konversation beizutreten.

12 Jahre 9 Monate her #2940 von andykoa
Bitte anmelden, um die Antwort zu sehen. Achtung: Eine gültige Subscription wird benötigt, um einen Account zu aktivieren.

Bitte Anmelden, um der Konversation beizutreten.

12 Jahre 9 Monate her - 12 Jahre 9 Monate her #2941 von Viktor
Bitte anmelden, um die Antwort zu sehen. Achtung: Eine gültige Subscription wird benötigt, um einen Account zu aktivieren.

Kubik-Rubik Joomla! Extensions

Dieser Beitrag enthält einen Anhang.
Bitte anmelden (oder registrieren) um ihn zu sehen.

Bitte Anmelden, um der Konversation beizutreten.

Ladezeit der Seite: 0.162 Sekunden