Save resize image

Discussions about image processing and document imaging.
Post Reply
bpabmeyer
Posts: 20
Joined: Tue Oct 07, 2008 4:32 pm

Save resize image

Post by bpabmeyer » Mon Sep 24, 2012 3:53 pm

I am trying to save a scanned image to PDF. The scanned image is full size letter/legal. I need to save the image resizing it to leave a 2 inch margin on top or bottom. Is this possible? If so, how do I accomplish it. Attached is what I have for the current processing.


Dim file As File = Nothing
Dim imageID As Integer

If GdPictureImaging.TwainOpenSource(Me.Handle, lblScannerName.Text) Then
InitScanConfig()

imageID = GdPictureImaging.TwainAcquireToGdPictureImage(Me.Handle)
ScanRecord = imageID
GdPicturePDF.NewPDF()
If imageID <> 0 Then
GdPicturePDF.AddImageFromGdPictureImage(imageID, False, True)
GdViewer1.ZoomMode = ViewerZoomMode.ZoomModeFitToViewer
GdViewer1.DisplayFromGdPictureImage(imageID)
End If
Else
ScanRecord = 0
End If
GdPicturePDF.SaveToFile(strDocumentPath & Year(Now()) & "\" & lblFirmNumber.Text & ".pdf")

Gabriela
Posts: 422
Joined: Wed Nov 22, 2017 9:52 am

Re: Save resize image

Post by Gabriela » Thu Jan 31, 2019 4:11 pm

Hi,

Use AddImageFromGdPictureImage() method with the DrawImage parameter set to false:
http://guides.gdpicture.com/content/web ... lean).html
And then draw that image with the required size using DrawImage() method:
http://guides.gdpicture.com/content/web ... Image.html
Kind regards,

Gabriela
GdPicture Team

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests