VPicture enhancements work
Ruslan Zasukhin
sunshine at public.kherson.ua
Fri Jun 13 20:54:52 CDT 2003
on 6/13/03 16:45, Chuck at rwc1717 at shaw.ca wrote:
Hi Chuck,
> Hi Ruslan:
> After a good nights sleep and remembering to change the property of my field
> object to a VPicture (that is how I went dumb and couldn't get the code to
> work).
> instaed of a VBlob, as it had been.
>
> To add data to aVPicture field:
>
> dim p as Picture
> dim s as String
>
> p = canvas1.backdrop
> s = PictureToJPEGString(p,100)
> tDb.mA.SetBlank
> tDb.mA.VPictfield.PutFormatedPict(20,s)
> tDb.mA.AddRecord
> tDb.Flush
>
> To get data from a VPicture field:
>
> dim p as Picture
> dim s as String
> dim res as Boolean
> dim rs as VCursor
>
> rs = Nil
> rs = tDb.SQLSelect("select from picts")
> res= tDb.mA.FirstRecord
> s= tDb.mA.VPictfield.GetFormatedPict()
>
> How do I check what type of image I have..can I query GetFormatedPict() to get
> type? or must I decipher the header another way? And if use MonkeyBread
> StringToPicture() and PictureToString()..QuickTime must be installed.
Format of picture header was described in some docs.
You can read this header or only its part using
VBLOB.ReadRawData
Do not forget that Vpicture is SUBCLASS of VBLOB
So it have all THE SAME functions of parent classes.
> p = JPEGStringToPicture(s,true)
> tDb.Flush
> canavs2.backdrop = p
>
> Otherwise it works fine....the image was dropped, stored and retrieved.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list