Rotating the image displayed in the GDViewer and Save Later.

Discussions about document viewing.
Post Reply
suhasg088
Posts: 3
Joined: Sat Sep 03, 2011 10:46 am

Rotating the image displayed in the GDViewer and Save Later.

Post by suhasg088 » Tue Sep 06, 2011 2:58 pm

Hi,

I have used below code for displaying the image:
imageid = GDPViewer.DisplayFromFile(FilePath)

Below code for rotating image:
GDPViewer.Rotate(RotateFlipType.Rotate90FlipNone)

Below code for saving the image in BMP format:

Code: Select all

Dim oGdPictureImaging As New GdPictureImaging

For intIndex = 0 To GDPThumbnailEx.ItemCount - 1
      If GDPThumbnailEx.GetItemSelectState(intIndex) Then
          strFileName = GDPThumbnailEx.GetItemText(intIndex)
          Exit For
      End If
Next
oGdPictureImaging.SaveAsBMP(imageid, FilePath)
But using the above code the saved image is still in the same way as it was displayed before rotation. Means the image saved is not in the rotate format. And one morething is the imageid is always 0 for all the images displayed in the viewer.

Thanks,
Suhas

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Rotating the image displayed in the GDViewer and Save La

Post by Loïc » Tue Sep 06, 2011 3:14 pm

Hi,

You have to rotate the image using the GdPictureImaging class.
The GdViewer handles image in read only mode.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests