Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print image from a blob field
Message
 
À
17/11/2004 22:13:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Divers
Thread ID:
00962468
Message ID:
00962488
Vues:
63
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform