Search in support tickets

#477 – tag text sur les images

Posted in ‘Support’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Friday, 14 December 2018 15:25 CET
marinship
Joomla! version : 3.9
PHP version : 7.2.9
AdsManager version : 3.2pro

Bonjour Loïc,
je reviens vers vous à propos de mon post précédent (442 – tag text sur les images) et expliquer la solution que j'ai mise en oeuvre.

J'ai juste modifié la fonction d'incrustation d'image pour prendre celle qui accepte l'argument de transparence 'imagecolorallocatealpha', 4ème argument. Ensuite j'ai joué sur les degrés de 'imagettftext', 3ème argument, le tout adapté pour les vignettes aussi.

Vous trouverez en PJ une image du résultat.

Bien cordialement,
RM

Voici mon code placé dans une condition :
			if ($v_txt) { // version Texte
				// modif du 12/11/2018 tag sur les photos
				// blanc 		: 255, 255, 255 (red, green, blue)
				// jaune Boat 	: R249-V243-B171 en MyriadPro en 72 point - Transparence 35%
				// la fonction 'imagecolorallocate' est rempacée par 'imagecolorallocatealpha'
				// qui comporte un argument de transparence, le 4ème (maxi 127)
				$textcolor = imagecolorallocatealpha($dst_img, 249, 243, 171, 95);
				// nouvelle police de caractères
				$fontfile = JPATH_ROOT."/components/com_adsmanager/font/myriad_pro_bold_italic_31626.ttf";
				if ($dst_ext != "jpeg") {
					if (function_exists('imagettftext')) {
						imagealphablending( $dst_img, true );
						// image, size, degrés d'inclinaison, x, y, color, fontfile, text
						// x et y définissent les positions gauche-hauteur (le coin du 1er caractère)
						imagettftext ($dst_img, 40, 30, 50, 160,$textcolor,$fontfile,$tag );
						imagealphablending( $dst_img, false );
					}
				} else {
					if (function_exists('imagettftext')) {
						// image, size, degrés d'inclinaison, x, y, color, fontfile, text
						// x et y définissent les positions gauche-hauteur (le coin du 1er caractère)
						imagettftext ($dst_img, 40, 30, 50, 160,$textcolor,$fontfile,$tag );
					}
				}
			}

Custom Fields

Joomla Version 3.9
PHP Version 7.2.9
Product AdsManager
Product Version 3.2pro
Attachment
pouvreau-sillage-11-30-aluminium-lg-ht-12-00-m_3389_2.jpg
Monday, 17 December 2018 13:03 CET
loic
Bonjour,

Si on peut facilement rendre cette fonctionnalité configurable, ça peut être pas mal.

Merci beaucoup :)

Cordialement.
 
Wednesday, 19 December 2018 12:33 CET
marinship
Bonjour Loïc,
Oui, il y a juste à ajouter dans la partie config du tag, une textbox ou listbox pour déterminer les degrés d'orientation (0 à 360), une autre pour le taux de transparence (maxi 127).
Bien cordialement et bonnes fêtes !
RM
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.