×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
cropResize
Eric Fagault
Nouveau membre
Posts: 18
il y a 6 ans 7 mois - il y a 6 ans 7 mois #1776
par Eric Fagault
cropResize a été créé par Eric Fagault
Hello,
I need to resize and crop an image.
I looked at your documentation "www.component-creator.com/joomladocs/joo...mage/cropResize.html"
I built my code like this:
But it sends me an error, which tells me that the image does not exist.
Yet it looks good when I do:
<img src = "<? php echo $ uploadPath;?>" />
How would you do it??
Best regards.
Eric
I need to resize and crop an image.
I looked at your documentation "www.component-creator.com/joomladocs/joo...mage/cropResize.html"
I built my code like this:
<?php
$ImageWidth = 250; [attachment=88]Capture_cropSize.JPG[/attachment] [attachment=88]Capture_cropSize.JPG[/attachment]
$ImageHeight = 180;
//Chemin de la photo à retailler
$uploadPath = '/media/com_esoffers/images/photos_annonce' . DIRECTORY_SEPARATOR . $PhotoPrincipale;
//cropResize
// TEST 1
/*
$image = new JImage($uploadPath);
$newimage = $image->cropResize('250', '180');
$newimage->toFile('/media/com_esoffers/images/photos_annonce/annonces1'.$idOffers.'.jpg');
*/
// TEST 2
$image = new JImage($uploadPath);
$newimage = $image->cropResize($ImageWidth, $ImageHeight);
$newimage->toFile('/media/com_esoffers/images/photos_annonce/annonces1'.$idOffers.'.jpg');
?>
<img src="/media/com_esoffers/images/photos_annonce/annonces1<?php echo $idOffers; ?>.jpg" alt="" title="Voir l'annonce"/>
<!-- For display test -->
<img src="<?php echo $uploadPath; ?>"/>
But it sends me an error, which tells me that the image does not exist.
Yet it looks good when I do:
<img src = "<? php echo $ uploadPath;?>" />
How would you do it??
Best regards.
Eric
Dernière édition: il y a 6 ans 7 mois par Eric Fagault.
Connexion ou Créer un compte pour participer à la conversation.
Jamila
Visiteur
il y a 6 ans 6 mois #1798
par Jamila
Réponse de Jamila sur le sujet cropResize
Hi Eric,
thank you for pointing that out. The documentation you found is outdated. Here you can find the Joomla! Documentation for Joomla! 3.8: api.joomla.org/cms-3/classes/Joomla.Imag...age.html#method_crop
We will update the documentation on our website as soon as possible.
Best regards,
Jamila Cisse
thank you for pointing that out. The documentation you found is outdated. Here you can find the Joomla! Documentation for Joomla! 3.8: api.joomla.org/cms-3/classes/Joomla.Imag...age.html#method_crop
We will update the documentation on our website as soon as possible.
Best regards,
Jamila Cisse
Connexion ou Créer un compte pour participer à la conversation.
Pieter-Jan van Rossen
Nouveau membre
Posts: 11
il y a 6 ans 3 mois #1827
par Pieter-Jan van Rossen
Keep in mind that this is also depricated
Réponse de Pieter-Jan van Rossen sur le sujet cropResize
Hi Eric,
thank you for pointing that out. The documentation you found is outdated. Here you can find the Joomla! Documentation for Joomla! 3.8: api.joomla.org/cms-3/classes/Joomla.Imag...ge.html#method_crope
Keep in mind that this is also depricated
Connexion ou Créer un compte pour participer à la conversation.
Temps de génération de la page : 0.068 secondes