Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di miksco
    Registrato dal
    Oct 2012
    Messaggi
    20

    Sovrapposizione trasparente ed obliqua di due immagini

    Buona giornata e buona domenica a tutti.
    Scrivo perchè ho bisogno di aiuto con un, forse, banalissimo problema riguardo le GD2 di PHP.

    Ho prelevato dal sito php.net quanto segue:
    Codice PHP:
    <?php
    // Load the stamp and the photo to apply the watermark to
    $stamp imagecreatefrompng('stamp.png');
    $im imagecreatefromjpeg('photo.jpeg');

    // Set the margins for the stamp and get the height/width of the stamp image
    $marge_right 10;
    $marge_bottom 10;
    $sx imagesx($stamp);
    $sy imagesy($stamp);

    // Copy the stamp image onto our photo using the margin offsets and the photo 
    // width to calculate positioning of the stamp. 
    imagecopy($im$stampimagesx($im) - $sx $marge_rightimagesy($im) - $sy $marge_bottom00imagesx($stamp), imagesy($stamp));

    // Output and free memory
    header('Content-type: image/png');
    imagepng($im);
    imagedestroy($im);
    ?>
    Il quale serve a sovrapporre in alpha channel due immagini.

    Io ho bisogno che l'immagine sovrapposta sia ESATTAMENTE DIAGONALE all'immagine di "sfondo" le cui dimensioni (altezza/larghezza) sono variabili.

    Qualcuno mi sa aiutare?

  2. #2
    Utente di HTML.it L'avatar di miksco
    Registrato dal
    Oct 2012
    Messaggi
    20
    Risolto

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.