Page 1 of 1

Optimized saved jpeg image using GdPicturePDF

Posted: Fri Mar 28, 2014 7:58 am
by maximaa14
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.

Re: Optimized saved jpeg image using GdPicturePDF

Posted: Wed Apr 23, 2014 2:51 pm
by SamiKharma
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