Results 1 to 14 of 14

Thread: [RESOLVED] webp convert to jpg

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2011
    Posts
    806

    Resolved [RESOLVED] webp convert to jpg

    Hi All. does anyone have any code that converts a webp image to jpg. i have used freeimage.dll ver 3.18 and MFreeImage ver 2.24 and strangely one time it works and then the next it doesn't on the same image.

    i am trying to use.

    Code:
        dib = FreeImage_LoadEx(Source, FILO_LOAD_DEFAULT, 300, 450)
    
        bOK = FreeImage_Save(FIF_JPEG, dib, Destination, 0)
    
    
    
        ' Unload the dib
        FreeImage_Unload (dib)

    or this

    Code:
    Public Function ConvertWebPToJPG2(webpFile As String, jpgFile As String) As Boolean
        Dim dib As Long
        Dim Success As Long
        
        ' Initialize FreeImage
        FreeImage_Initialise True
        
        ' Load WebP image
        dib = FreeImage_Load(FIF_WEBP, webpFile, 0)
        If dib = 0 Then
            MsgBox "Failed to load WebP image!"
            FreeImage_DeInitialise
            ConvertWebPToJPG2 = False
            Exit Function
        End If
        
        ' Save as JPG
        Success = FreeImage_Save(FIF_JPEG, dib, jpgFile, 0)
        
        ' Free resources
        FreeImage_Unload dib
        FreeImage_DeInitialise
        
        ConvertWebPToJPG2 = (Success <> 0)
    End Function
    I am downloading images from trakt and then want to convert to jpg and resize to show in a picture box.

    i just need something 100% everytime.

    thanks
    Last edited by k_zeon; May 16th, 2026 at 01:25 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width