Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print image from a blob field
Message
 
To
17/11/2004 22:13:27
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00962468
Message ID:
00962488
Views:
64
Thank, but i just make this work by doing something like this in the render event in the reportlistener
IF m.GDIPlusImage # 0 AND NOT EMPTY(Stock.Photo1)
	TRY
		img = 0
		cFile = FORCEEXT(SUBSTR(SYS(2015), 3), "JPG")
		STRTOFILE(Stock.Photo1, cFile)
		DECLARE INTEGER GdipLoadImageFromFile IN gdiplus STRING filename,INTEGER @ img
		IF GdipLoadImageFromFile(STRCONV(cFile+CHR(0),5), @img) = 0
			DODEFAULT(nFRXRecno, nLeft, nTop, nWidth, nHeight, nObjectContinuationType, cContentsToBeRendered, img)
		ELSE
			DODEFAULT(nFRXRecno, nLeft, nTop, nWidth, nHeight, nObjectContinuationType, cContentsToBeRendered, GDIPlusImage)
		ENDIF
		CLEAR DLLS GdipLoadImageFromFile
	CATCH TO oErr
		MESSAGEBOX(oErr.Message + CHR(13) + CHR(10) + oErr.LineContents)
		DODEFAULT(nFRXRecno, nLeft, nTop, nWidth, nHeight, nObjectContinuationType, cContentsToBeRendered, GDIPlusImage)
	FINALLY
		IF img # 0
			DECLARE INTEGER GdipDisposeImage IN gdiplus INTEGER
			GdipDisposeImage(img)			
			CLEAR DLLS GdipDisposeImage
		ENDIF
		IF FILE(cFile)
			ERASE (cFile)
		ENDIF
	ENDTRY
ELSE
	DODEFAULT(nFRXRecno, nLeft, nTop, nWidth, nHeight, nObjectContinuationType, cContentsToBeRendered, GDIPlusImage)
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform