Hi, Here is a (very big) PB:
... ' Get picture /path/name.ext INfile = FileChooser1.SelectedPath FileSize = Stat(FileChooser1.SelectedPath).Size ' Read file into a string INstream = OPEN INfile FOR INPUT ' READ #INstream, INstring, Lof(INstream) ' NA: Returns 238 bytes READ #INstream, INstring, FileSize ' Erk: same thing :( CLOSE #INstream PRINT "INstring length (Len, String.Len) = " & Len(INstring) & " - " & String.Len(INstring) Returns "298 - 234" when I read a small picture.png file!?? How could I correctly read this image wothout any loss? Purpose is to read it correctly, convert it to base64 and send it to a postgresql procedure (and, of course, the opposite.) JY -- For a man to truly understand rejection, he must first be ignored by a cat. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user