Re: Best way to base64encode a jpeg file ?

2025-02-05 Thread jbv via use-livecode
Richard & Mark, Thank you both for your suggestions. I actually made some progress, as there were 2 different issues : 1- the syntax of the multimodal json curl must be {"type" : "image_url", "image_url" : {"url": "data:image/jpeg;base64,{_BASE64_}"}} instead of {"type" : "image_url", "i

Re: Best way to base64encode a jpeg file ?

2025-02-05 Thread Monte Goulding via use-livecode
Hi jbv > Here is my code for base64 encoding : > put URL ("file:" & "myfile.jpg") into timagedata Use `binfile:` here instead of `file:` so the engine doesn’t treat the data as native text and fiddle with it > put base64encode(timagedata) into tBase64Image > replace return with "" in tBase64

Re: Best way to base64encode a jpeg file ?

2025-02-05 Thread Bob Sneidar via use-livecode
I’m curious whether or not this solution worked… Bob S > On Feb 5, 2025, at 1:35 AM, Monte Goulding via use-livecode > wrote: > > Hi jbv > >> Here is my code for base64 encoding : >> put URL ("file:" & "myfile.jpg") into timagedata > > Use `binfile:` here instead of `file:` so the engine do

RE: Best way to base64encode a jpeg file ?

2025-02-05 Thread Ralph DiMola via use-livecode
I can see getting rid of extraneous CRs or LFs but aren’t "+","/" and "=" part of the encoding and corrupt the base 64 data stream? Or am I missing something? Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:u