Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resized image is not in a recognized format
Message
De
04/03/2009 02:28:01
 
 
À
24/02/2009 04:18:06
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01383685
Message ID:
01385394
Vues:
35
I tried various approaches tonight. Here is a very simple version:
    Function ThumbnailCallback() As Boolean
        Return False
    End Function

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim oImage As System.Drawing.Image
        oImage = System.Drawing.Image.FromFile("D:\MSN Messenger\20073.jpg")

        Dim objCallback As System.Drawing.Image.GetThumbnailImageAbort = New System.Drawing.Image.GetThumbnailImageAbort(AddressOf ThumbnailCallback)

        oImage = oImage.GetThumbnailImage(90, 100, objCallback, IntPtr.Zero)

        oImage.Save("d:\test.jpg")
        Exit Sub
Everytime the image is resized, it ends up in a format that is really weird. LView Pro can no longer recognize the file. I have to open with Windows Image Viewer. Isn't this supported in .NET?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform