Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with getpicturevalfromhbitmap in VFP Paint
Message
 
À
23/03/2009 22:47:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Divers
Thread ID:
01390924
Message ID:
01390927
Vues:
72
>>Cesar - I am finding that the Getpicturevalfromhbitmap method call in your VFPPaint application has problems when the images selected for viewing are of a certain size. Selecting JPGs 900k+ in size results in the error shown below. Are you aware of a image size limitation?
>>
>>
>>XFCBITMAP.GETPICTUREVALFROMHBITMAP  
>>
>>AERROR() contents
>>2059
>>Unhandled Structured Exception.
>>ErrorNo: 1903
>>Message: String is too long to fit.
>>UserValue: 
>>Details: 
>>Procedure: getpicturevalfromhbitmap
>>
>>PROCEDURE VFPPAINT.INIT 
>>PROCEDURE VFPPAINT.UPDATECANVAS 
>>PROCEDURE XFCBITMAP.GETPICTUREVALFROMHBITMAP SYSTEM.DRAWING.FXP
>>(XFCBITMAP.GETPICTUREVALFROMHBITMAP)
>>
>>
>
>
>Hi Chris,
>I really had no idea of that kind of limitation.
>
>Anyway, we can still use a different encoder that uses less space - the PNG
>
>Please make a backup of VFPPaint.Scx, and lets play with your copy, making some changes as follow:
>
>USe the Search / replace tool
>
>Search for the string:
>".GetPictureValFromHBitmap()"
>
>
>REPLACE in all occurencies with:
>".GetPictureVal(_Screen.System.Drawing.Imaging.ImageFOrmat.Png)"
>
>without the quotes, :-)
>
>Test it and tell me how it goes !
>IMPORTANT - recommended VFP9 SP2 for this purpose,other versions may crash
>
>
>Hope this helps !
>
>Cesar

That worked like a charm. Can now load 2.5meg pics. Thanks for the quick reply. Great app btw.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform