conversion image via WIA erreur
Bonjour a tous
j'essai de convertir une png en gif avec WIA mais j'ai un message d'erreur que je ne saisi pas
j'ai beau chercher je ne trouve rien de concluant
une idée?????
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Sub transform2(chemin)
Dim Img 'As ImageFile
Set Img = CreateObject("WIA.ImageFile")
Img.LoadFile chemin
If Img.FormatID <> wiaFormatGIF Then
Dim IP 'As New ImageProcess
Set IP = CreateObject("Wia.ImageProcess")
IP.Filters.Add IP.FilterInfos("Convert").FilterID
IP.Filters(1).Properties("FormatID").Value = wiaFormatGIF
Set Img = IP.Apply(Img)
Img.SaveFile ThisWorkbook.Path & "\copie.gif"
End If
End Sub |