Partage
  • Partager sur Facebook
  • Partager sur Twitter

Images en PHP

Création automatique de logo sur image

    25 novembre 2005 à 15:47:25

    Bonjour a toutes et a tous !
    Ca fait maintenant 2 jours que je flanche sur le cours concernat les images et PHP
    Voila mon soucis
    J'ai un code ( copier ci-dessous ) qui me permet d'aller chercher automatiquement des images : il s'agit d'un agrandissement en POP UP

    Mon probleme, et malgré les cours !

    Je n'arrive pas a y installé correctement le script PHP pour y collé automatiquement un logo

    Merci d'avance pour toute aide
    Nikko
    Voici mon code (désolé pour la longueur)

    <?php
    // onClick=\"window.open('photo.php?photo=$photo', '', 'menubar=no,toolbar=no,scrollbars=yes');\"

    $max_width2b=800;
    $max_height2b=600;
    list($width, $height, $type, $attr) = getimagesize($photo);
    if ($width>$max_width2b && $width>=$height)
    {
    $thumb_width21b=$max_width2b;
    $thumb_height21b=(int)($height/($width/$max_width2b));
    }
    else if ($height>$max_height2b && $height>$width)
    {
    $thumb_height21b=$max_height2b;
    $thumb_width21b=(int)($width/($height/$max_height2b));
    }
    else
    {
    $thumb_height21b=$height;
    $thumb_width21b=$width;
    }
    $dim_h1=$thumb_height21b+85;
    $dim_w1=$thumb_width21b+50;
    ?>
    <html>
    <head>
    <script>
    if (screen.width<<?php echo "$dim_w1"; ?>) { width=screen.width }
    else { width=<?php echo "$dim_w1"; ?> }
    if (screen.height<<?php echo "$dim_h1"; ?>) { height=screen.height }
    else { height=<?php echo "$dim_h1"; ?> }
    window.resizeTo(width,height)
    </script>
    </head>

    <body bgcolor="#FFFFFF">
    <?php

    echo "<img src=\"$photo\" width=\"$thumb_width21b\" height=\"$thumb_height21b\">";
    ?>
    • Partager sur Facebook
    • Partager sur Twitter
      25 novembre 2005 à 15:56:13

      Salut.
      ton script faudrait pas le renseigner sur le type?
      • Partager sur Facebook
      • Partager sur Twitter
        25 novembre 2005 à 16:31:25

        ICI

        Relit bien, ton code a certain probleme, sourtout il a pas de header^^
        • Partager sur Facebook
        • Partager sur Twitter

        Images en PHP

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown