Visualizzazione dei risultati da 1 a 6 su 6

Discussione: thumbnails

  1. #1

    thumbnails

    salve
    qualcuno m sa dire com emai sto fetente di script nn mi funziona???
    mi da errore sulle righe in verde!
    in qualunque modo le scriva o le dichiari mi da errore :°°°




    <%@Import Namespace="System.Drawing.Imaging" %>
    <script language="VB" runat="server">
    Function ThumbnailCallback() as Boolean
    Return False
    End Function


    Sub Page_Load(sender as Object, e as EventArgs)

    'Read in the image filename to create a thumbnail of
    Dim imageUrl as String = Request.QueryString("img")

    'Add on the appropriate directory
    imageUrl = "/public/mangaphotoalbum/file/" & imageUrl


    Dim fullSizeImg as System.Drawing.Image
    fullSizeImg = System.Drawing.Image.FromFile(Server.MapPath(image Url))

    if fullSizeImg.Height > fullSizeImg.Width then
    Dim imgWidthNew as Integer = 100
    imgHeightNewTemp = (fullSizeImg.Width * 100) / fullSizeImg.Height
    Dim imgHeightNew as Integer = imgHeightNewTemp

    else
    imgWidthNewTemp = Fix((fullSizeImg.Height * 100) / fullSizeImg.Width)
    Dim imgWidthNew as Integer = imgWidthNewTemp

    Dim imgHeightNew as Integer = 100
    end if

    'Do we need to create a thumbnail?
    Response.ContentType = "image/gif"
    If imgWidthNew > 0 and imgHeightNew > 0 then
    Dim dummyCallBack as System.Drawing.Image.GetThumbNailImageAbort
    dummyCallBack = New System.Drawing.Image.GetThumbnailImageAbort(Addres sOf ThumbnailCallback)

    Dim thumbNailImg as System.Drawing.Image
    thumbNailImg = fullSizeImg.GetThumbnailImage(imgWidthNew, imgHeightNew, dummyCallBack, IntPtr.Zero)

    thumbNailImg.Save(Response.OutputStream, ImageFormat.Gif)
    thumbNailImg.Dispose()
    Else
    fullSizeImg.Save(Response.OutputStream, ImageFormat.Gif)
    fullSizeImg.Dispose()
    End If

    End Sub

    </script>




  2. #2
    Utente di HTML.it
    Registrato dal
    Aug 2001
    Messaggi
    1,482
    mi pare che imgHeightNewTemp e imgWidthNewTemp non siano dichiarati.

    Hey hey, my my Rock and roll can never die!

  3. #3
    niente nn funziona :°°°°

    se assegno io un numero alla variabile, tipo 120, mi funziona, se gli faccio fare quei calcoli nn funzia :°°°°


  4. #4

  5. #5
    siccome ho il server su aruba, mi da l'errore sul customizableError=Off e nn dice di rpeci qule è l'errore :°

    ke faccio?

  6. #6
    ok ho risolto!

    nn conosco quasi x nulla l'asp.net e nn sapevo come metter eil web.config, ora mi funzia!

    grazie los tesso


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