[V4RB-VServer] can't work with pictures

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jun 10 10:44:53 CDT 2005


On 6/10/05 10:26 AM, "Eric Ferrer" <wonderfef at noos.fr> wrote:

> To get back to my initial problem, you told me that the way I built
> my database is OK.
> So maybe my problem comes from the way I'm adding a picture :
> 
>    dim cursor as VCursor
>    dim thumb, pix as picture
>    dim id as string
> 
>    id = GetUniqueID()
> 
>    cursor = theDatabase.SqlSelect("SELECT * FROM Pictures WHERE ID =
> '" + id + "'", 2, 1)
> 
>    if cursor = nil then
>      MsgBox "cursor is nil"
>      Return
>    end if
> 
>    cursor.SetBlank
> 
>    pix = NewPicture(myPicture.Width, myPicture.Height, 32)
>    pix.Graphics.DrawPicture myPicture, 0, 0
>    thumb = NewPicture(32, 32, 32)
>    thumb.Graphics.DrawPicture myPicture, 0, 0, 32, 32, 0, 0,
> myPicture.Width, myPicture.Height
> 
>    cursor.Field("ID").SetString id
> 
>    cursor.PictureField("Thumb").SetPicture(thumb, 100)
> 
>    cursor.PictureField("Picture").SetPicture(pix, 100)
> 
>    cursor.Field("Name").SetString trim(EditField1.Text)
> 
>    if cursor.add = false then
>      MsgBox "can't add record" + EndOfLine + theDatabase.ErrString +
> " (#" + CStr(theDatabase.ErrNumber) + ")"
>    else
>      theDatabase.Flush
>      close
>    end if

To isolate problem

1) try only one picture field with original picture
    case: dumb is bad

2) try compression ratio 50

3) 

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list