>>>ÿØÿà>>
>OK :<birth_date>01/01/1975 00:00:00</birth_date><Gender>F</Gender><Height>64</Height><height_m>163</height_m><mug_shot>ffd8ffe000104a46494600010101007700770000ffdb004300080606070605080707070909080a0c140d0c0b0b0c1912130f141d1a1f1e1d1a1c1c20242e24549a9fffd9</mug_shot><Weight>151</Weight><weight_m>68</weight_m> >>
>case m.iType = 2 && Memo > LOCAL lcValue > lcValue = EVALUATE(ImageSource) > if !empty(m.lcValue) AND NOT ISNULL(m.lcValue) >*Wait window type("&ImageSource") > if NOT ',' $ ImageSource AND inlist(type("&ImageSource"), "M","Q","W") and len(&ImageSource)>1 > cOFile = GenOFile(".jpg",.t.) > copy MEMORY(m.ImageSource) to (m.cOFile) > cOFile = E0Resize(m.cOFile, dpi) > ENDIF > > IF ',' $ ImageSource > cOFile = GenOFile(".jpg",.t.) > STRTOFILE(m.lcValue, cOFile) >*!* if INLIST(type("&ImageSource"), "Q","W") && blob field >*!* cOFile = GenOFile(".jpg",.t.) >*!* strtofile(&ImageSource,m.cOFile) > cOFile = E0Resize(m.cOFile, dpi) > endif > endif>
#region Graphics extensions public static Bitmap ToBitMapImage(this byte[] array) { Bitmap bmp; using (var ms = new MemoryStream(array)) { bmp = new Bitmap(ms); } return bmp; } #endregion public static byte[] ConvertStringToBytes(this string s) { MemoryStream stream = new MemoryStream(); using (StreamWriter writer = new StreamWriter(stream)) { writer.Write(s); writer.Flush(); } return stream.ToArray(); } public static string ConvertBytesToString(this byte[] b) { string output = String.Empty; MemoryStream stream = new MemoryStream(b) { Position = 0 }; using (StreamReader reader = new StreamReader(stream)) { output = reader.ReadToEnd(); } return output; }