Visualizzazione dei risultati da 1 a 2 su 2

Discussione: problema con Bitmap

  1. #1

    problema con Bitmap

    Nell'eseguire il codice per ridimensionare le immagini:

    Dim objBMP As New Bitmap("pippo.bmp")
    Dim objGraphics As System.Drawing.Image


    Dim imgw As Integer = objBMP.Width
    Dim imgh As Integer = objBMP.Height

    Dim maxImage As Integer = 200
    Dim newimgw, newimgh As Integer
    If imgw > imgh Then
    newimgw = maxImage
    newimgh = (imgh * maxImage) / imgw
    ElseIf imgh > imgw Then
    newimgw = (imgw * maxImage) / imgh
    newimgh = maxImage
    Else
    newimgw = maxImage
    newimgh = maxImage
    End If
    objGraphics = objBMP.GetThumbnailImage(newimgw, newimgh, Nothing, IntPtr.Zero)
    objGraphics.Save("pippoRid.bmp")

    ricevo un errore -- "Utilizzato parametro non valido"

    alla riga : Dim objBMP As New Bitmap("pippo.bmp")


    Qualcuno sa dirmi il perchè ?

    Grazie 1000

  2. #2
    Utente di HTML.it
    Registrato dal
    Dec 2003
    Messaggi
    111
    Dim objBMP As New Bitmap(Server.MapPath("pippo.bmp"))

    ciao, javalon

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.