Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print image
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01253570
Message ID:
01253821
Vues:
35
What would be really nice is to print a picture at a natural size. When I create an image from the decoded data, I can open it with Windows Image Viewer and it has just the right size.
I understand the report solution, but it is one more extra piece to the project.

>>Ok, I got it working, thanks a lot.
>>Having more questions. What I print is a shipping label. It supposed to be 4x6 but what I am actually getting printed is much larger. Do I need to do any zooming? Is it actually going thru a printer driver?
>>
>>Thanks again for help.
>>
>
>
>If you need that kind of control over the size and placement of the image, I can recommend 2 approaches:
>
>1) Make a VFP report and use an Picture/OLE control on the report. When you specify the "Control Source" for the Picture, use an expression and set it to an Image object that you loaded with the PictureVal proeprty. This will give you the most control with an IDE interface (the report designer). You also don't need GDIPlusX. However, you will have to build a dummy cursor to run your report against.
>
>
>oImg = CREATEOBJECT("Image")
>oImg.PictureVal = STRCONV(lcEncodedGif,14)
>** reference "oImg" as the control source on your report
>CREATE CURSOR tempDummyCursor (field1 c(10))
>APPEND BLANK
>REPORT FORM gifoutput TO PRINTER
>USE IN SELECT("tempDummyCursor")
>
>
>2) Look at the code in the ToPrinter method to see how the image is being drawn onto the printer's HDC and make your own function that can force the size and position to be what you want.
>
>Hmmm...but now that I think about it. This would be a nice feature to add to the ToPrinter method; the ability to specify a Rectangle for position and size.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform