Visualizzazione dei risultati da 1 a 8 su 8
  1. #1

    imagecreatetruecolor e ImageCreate

    Scusate se vi rompo. Se uso il primo nella creazione di una thumbs mi da lo sfondo nero, con la seconda funzione non me la da ma mi da delle immagini oscene.
    Help...
    E scusate

  2. #2
    Utente di HTML.it L'avatar di pyotrex
    Registrato dal
    Feb 2003
    Messaggi
    554
    Dai un occhio qua http://forum.html.it/forum/showthrea...hreadid=795862
    dovresti trovare tutto quello che ti serve
    Vivrò una vita intera e fortunatamente morirò una volta sola

  3. #3

    MMMM

    Grazie ma non ho trovato nulla sto impazzendo....
    Grazie di nuovo

  4. #4
    Utente di HTML.it L'avatar di pyotrex
    Registrato dal
    Feb 2003
    Messaggi
    554
    Forse l'avrai già letto, in ogni caso ti segnalo l'articolo per utilizzare le GD
    http://freephp.html.it/articoli/view_articolo.asp?id=93
    Vivrò una vita intera e fortunatamente morirò una volta sola

  5. #5
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858

    Re: MMMM

    [supersaibal]Originariamente inviato da lenny1875
    Grazie ma non ho trovato nulla sto impazzendo....
    Grazie di nuovo [/supersaibal]
    posta il codice che usi
    think simple think ringo

  6. #6

    ecco il cod

    Ecco il cod siete dei grandi
    calcolate che $tnsize è impostato a 90 ora se l'immagine è più bassa tipo 70 mi da un riquadro nero di 20 sotto


    $tnimage = imagecreatetruecolor($tnsize, $tnsize);

    // allocate the background colour for the thumbnail
    $darkblue = ImageColorAllocate($tnimage, 0, 0, 127);
    // set the background as transparent
    ImageColorTransparent($tnimage,$darkblue);
    imagefilledrectangle($destImage, 0, 0, $destW, $destH, $bg);
    // get the parameters of the big image
    $sz = GetImageSize($image);
    // load our internal variables
    $x = $sz[0]; // big image width
    $y = $sz[1]; // big image height
    // find the larger dimension
    if ($x>$y) { // if it is the width then
    $dx = 0; // the left side of the new image
    $w = $tnsize; // the width of the new image
    $h = ($y / $x) * $tnsize; // the height of the new image
    $dy = 0; // the top of the new image
    }else{ // if the height is larger then
    $dy = 0; // the top of the new image
    $h = $tnsize; // the height of the new image
    $w = ($x / $y) * $tnsize; // the width of the new image
    $dx = ($tnsize - $w) / 2; // the left edgeof the new image
    }

    // copy the resized version into the thumbnal image
    imagecopyresampled($tnimage, $bigimage, $dx, $dy, 0, 0, $w, $h, $x, $y);
    // generate the PNG image
    ImagePNG($tnimage);
    // release the memory used by the thumbnail image
    ImageDestroy($tnimage);
    // release the memory used by the original big image
    ImageDestroy($bigimage);
    // all done!

    Grazie

  7. #7

    Nessuno mi aiuta

    Niente mi avete abbandonato, dove sbaglio???
    Ola Lenny

  8. #8

    Finamelmente.....

    Ho risolto ragazzi, grazie a tutti quelli che mi hanno aiutato. Se vi serve uno script che crea thumbs al volo ma proprio al volo mandatemi un'e-mail.
    Ola Lenny e buon fine settimana

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 © 2025 vBulletin Solutions, Inc. All rights reserved.