I have been playing around with your GDI+ Wrapper dll. Have you intentionally left out some classes' code? These methods seem to fail -g_cEncoders.EncoderForExtension(sExt) g_cEncoders as GDIPImageEncoderList)with GDI+ error 2. In your GDI+ Codecs sample project, trying saving and selecting All files and type in an extension in the file name e.g. test.png. |
Here’s the fixed code: … ' we've picked all files On Error Resume Next Dim sExt As String i = InStrRev(sFIle, ".") If (i > 0) Then sExt = Mid$(sFIle, i + 1) sExt = UCase$(sExt) Set cCodec = g_cEncoders.EncoderForExtension(sExt) End If On Error GoTo 0 If (cCodec Is Nothing) Then Set cCodec = g_cEncoders.Item(1) End If |