Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with getpicturevalfromhbitmap in VFP Paint
Message
 
To
23/03/2009 22:47:56
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Miscellaneous
Thread ID:
01390924
Message ID:
01390927
Views:
64
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform