Continued troubles with VPicture and V4RB

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Jan 29 18:43:54 CST 2004


on 1/29/04 6:02 PM, Gary Edge at valentina at panamind.com wrote:

> I've not had success saving a jpg image to a table. I've tried the
> following:
> 
>  dim f as folderitem
>  dim p as picture
>  dim ps as string
>  dim b as binaryStream
>  dim bool as boolean
> 
>  f = GetOpenFolderitem("")                          -- f is a jpg file
> for testing
>  b = f.openasbinaryFile
>  ps = b.read(b.length)
>  p = JPEGStringToPictureMBS(ps)              -- Plugin by MonkeyBread
> 
>  if p <> nil then
>    canvas1.backdrop = p                                -- shows
> picture correctly
>    c.pictureField("lpicture").SetPicture(p)   -- c is a pre-existing
> cursor w/ readwrite access
>    bool = c.update                                            -- bool
> is true
>  end
> 
> Now when I try to retrieve the picture using:
>  dim p as picture
> 
>  p = c.pictureField("lpicture").getpicture     -- c already exists and
> is correct record
> 
> p is nil.

Hmm,

On the first look you do all right.
You have get Picture, i.e. PICT and use SetPicture()
Which should compress it to JPG.

Even have no idea.

May be somebody from Picture GURU will help?
Erne?


-- 
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