Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use Gdiplus.dll to view multi-page Tif?
Message
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00799178
Message ID:
00800986
Views:
35
This message has been marked as the solution to the initial question of the thread.
Andy,

>A question for you:
>  Can one view a multi-page Tif file using:
>    Your code in gpImage.prg?
>    Or the FoxPro base Image control?

1. You can use gpImage.prg together with ListView ActiveX control:
If Not "gpImage" $ Set("Procedure")
	Set Procedure To gpImage Additive
EndIf

gdip = CreateObject("gpInit")
img = CreateObject("gpImage")
img.Load(lcFile)
img.SelectPage(1)
ThisForm.oleListView.Picture = img.GetPicture()
Here ListView is used only to display image and no ListView items should be added.

2. With this code you can split multipage TIFF into separate files and display them in Image control:
If Not "gpImage" $ Set("Procedure")
	Set Procedure To gpImage Additive
EndIf

gdip = CreateObject("gpInit")
img = CreateObject("gpImage")

* Store each page as separate file
img.Load("multpage.tif")
For i = 0 TO img.GetPageCount() - 1
	img.SelectPage(i)
	img.SaveAsJPEG("page" + Transform(i))
EndFor
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform