I have a problem when exporting PPTX slides to images using the GetThumbnail function: one many (but not all) slide thumbnails thus produced, some images are missing.
I could upload you the PPTX file in question, so as to allow for reproducing the problem yourself (let me know where to upload the file).
The code I use is this (with global c_PresentationDocument = New Aspose.Slides.Presentation(glb.strPathSource & c_Filename)):
Private Sub PPT_Save_Slides_in_Files(ByVal a_ppFile As String)
' Export PPT slides as single-slide PPTXs and JPGs
Dim sImageName As String
Dim img As Image
Dim objLock As New Object
Dim i As Integer = 1
Dim strNumber As String = ""
Dim filename As String = IO.Path.GetFileName(a_ppFile)
filename = filename.Substring(0, filename.Length - 5)
Try
For Each slide As ISlide In c_PresentationDocument.Slides
Console.WriteLine("Generating thumbnail for slide " & i & "/" & c_PresentationDocument.Slides.Count)
strNumber = i.ToString
' Insert leading zeros
While strNumber.Length < c_PresentationDocument.Slides.Count.ToString.Length
strNumber = "0" & strNumber
End While
' Export thumbnail
sImageName = filename & "_Slide" & strNumber & ".jpg"
Dim bmp As Bitmap = slide.GetThumbnail(1.33, 1.33)
bmp.Save(glb.strPathTarget & sImageName, System.Drawing.Imaging.ImageFormat.Jpeg)
i = i + 1
Next ' slide
Catch ex As Exception
glb.ExceptionHandling(ex.Message, "#0610", AddressOf Rollback)
Finally
End Try
End Sub
@drcarl,
I added a ticket with ID SLIDESNET-43101 to our issue tracking system. Our development team will investigate this case. We will inform you of any progress.
@drcarl,
Our development team investigated the issue. Unfortunately, we cannot reproduce it on our side. Please try to isolate the problem and provide additional information to help us to catch and fix the bug.
Strange. With us, the problem persists, and can be readily reproduced.
Anyway, here is our OS/software configuration:
Windows 11 Pro 21H2 22000.556, 64 bit
VB .NET Core 3.1
Aspose.Slides Version 22.2.0
Microsoft Visual Studio Community 2019, Version 16.11.11
Microsoft .NET Framework 4.8.04161
Region: Germany, German (DE)
Did you try it with the PPTX example file I provided?
With the same, or comparable, OS/software configuration?
Can you give me an example of the thumbnails you produced while trying to reproduce this issue?
@drcarl,
We tested the issue according to the information you provided above using the presentation you provided. Our results looks like this: images.zip (207.0 KB)
I’ve passed this additional information to our development team. We will check the issue again.
@drcarl,
Unfortunately, our developers have not been able to reproduce the image issue yet. Could you please share a sample project that allows us to see the problem?