Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GdiPlusX - ImageCanvas
Message
From
27/11/2007 10:09:31
 
 
To
27/11/2007 06:45:36
General information
Forum:
Visual FoxPro
Category:
VFPX/Sedna
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01271183
Message ID:
01271443
Views:
106
>>>Hi Sergio,
>>>
>>>Be careful doing this.
>>>After drawing on the surface, try moving the form to a position outside the screen, or minimize / restore the form screen.
>>>
>>>The biggest advantage of using the Image Canvas is that as you are drawing on the surface of an image control (Not true, the Canvas does exactly what my prior sample did, sending the image binaries to the PictureVal property), you leave for VFP to deal with all image refreshing.
>>
>>Hi Cesar,
>>I already switched my prg based drawing class to use GdiPlusX ImageCanvas as drawing 'playground' and it is working great up to now.
>>
>>Now I come to the point where I need to store bitmap with drawings into cursor and then redraw it later some place else from that cursor.
>>
>>What is the best tecnique to store bitmap into cursor (General? Blob? MemoB ?) and then later redraw it on another ImageCanvas ?
>>
>>Few more of your samples and I will be all set :)
>>
>>TIA
>>Sergio
>
>
>Hi Sergio,
>
>I never use General fields.
>IMO, the Blob field is the best option, but I'm not so sure about this.
>General fields are complicated, and sometimes it's very difficult to retrieve the image binaries.
>
>
>To obtain the binaries of your image form the ImageCanvas, try the following:
>
>
lqImgBinaries = Thisform.ImageCanvas1.oBmp.GetPictureValFromHBitmap() && for a BMP type
>
>or
>
>
lqImgBinaries = Thisform.ImageCanvas1.oBmp.GetPictureVal(.Imaging.ImageFormat.PNG) && for a PNG type.
>
>Storing the binaries with the PNG encoder will allow you to have the same quality as BMP, but using much less space. If you don't need a good quality, then you have the option to get the JPEG instead of PNG.


Thank you guys :)
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform