Optimized saved jpeg image using GdPicturePDF

Discussions about PDF management.
Post Reply
maximaa14
Posts: 1
Joined: Fri Mar 28, 2014 7:33 am

Optimized saved jpeg image using GdPicturePDF

Post by maximaa14 » Fri Mar 28, 2014 7:58 am

Hi

I have saved jpeg image with 85 quality from PDF file using GdPicturePDF Class. For that i used below code.

Code: Select all

            Dim oGdPicturePDF As New GdPicturePDF
            Dim oGdPictureImaging As New GdPicture10.GdPictureImaging

            oGdPicturePDF.LoadFromFile(Application.StartupPath & "/data/1.pdf", False)

            For i As Integer = 1 To oGdPicturePDF.GetPageCount

                oGdPicturePDF.SelectPage(1)

                Dim RasterizedPageID As Integer = oGdPicturePDF.RenderPageToGdPictureImageEx(300, False)

               Try
                    'oGdPictureImaging.SaveAsJPEG(RasterizedPageID, Application.StartupPath & "/data/" & i & ".jpg", 85)

                Catch ex As Exception
                    MsgBox("oGdPictureImaging.SaveAsJPEG: " & ex.ToString)
                End Try
                oGdPictureImaging.ReleaseGdPictureImage(RasterizedPageID)
            Next
I want to optimized jpeg file. I am new with GdPicture10. Please suggest me classes or methods which i will be used and reduce(optimized) image size without lossless image quality.

Thanks
Hiren Lad.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Optimized saved jpeg image using GdPicturePDF

Post by SamiKharma » Wed Apr 23, 2014 2:51 pm

Hi,

The only things you can do is either lower the rendering dpi, or the quality of the JPEG file to lower the size of the final file.

Best,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests