![]() ![]() Thankfully FireMonkey has a really easy to use CodecManager that allows you to SaveToFile or SaveToStream and convert to PNG or JPG across all platforms (which are vastly smaller in size). ![]() If you want to send an image via Stream using LiveBindings or want to save an Image to disk or into a database on a device with limited storage however, they are quite large. Qenvia_ocorrencia.ParamByName('COD_USUARIO').AsInteger := ufrmInicial.In FireMonkey, Bitmap is the common currency for working with images. Qenvia_ocorrencia.ParamByName('IMAGEM').LoadFromStream(imgfoto ftBlob) Qenvia_ocorrencia.ParamByName('MOVIMENTACAO').AsString := 'TRAMITADO' Qenvia_ocorrencia.ParamByName('OBS').AsString := memDetalhes.Text Qenvia_ocorrencia.ParamByName('LINK_MAPS').AsString := edtUrl.Text ![]() Qenvia_ocorrencia.ParamByName('CEP').AsString := edtCep.Text Qenvia_ocorrencia.ParamByName('BAIRRO').AsString := edtBairro.Text Qenvia_ocorrencia.ParamByName('NUMERO').AsInteger := StrToInt(edtNumero.Text) Qenvia_ocorrencia.ParamByName('RUA').AsString := edtRua.Text Qenvia_ocorrencia.ParamByName('OCORRENCIA').AsString := texto_listbox Qenvia_ocorrencia.ParamByName('HORA').AsDateTime := TIME Qenvia_ocorrencia.ParamByName('DATA').AsDate := DATE Qenvia_ocorrencia.ParamByName('STATUS').AsString := 'TESTE' Qenvia_ocorrencia.ParamByName('PROTOCOLO').AsString := '10' //pegar o ultimo protocolo Qenvia_('VALUES (:protocolo, :status, :data, :hora, :ocorrencia, :rua, :numero, :bairro, :cep, :link_maps,:obs,:movimentacao, :imagem, :cod_usuario)') Qenvia_('INSERT INTO SOLICITACOES (protocolo, status, data, hora, ocorrencia, rua, numero, bairro, cep, link_maps,obs,movimentacao,imagem, cod_usuario)') Qenvia_ocorrencia.Connection := datamodule3.Måonnection1 Qenvia_ocorrencia := TMyQuery.Create(nil) You see, I am developing for mobile, I carry a picture in a TImage (either the library or direct the camera), this photo loaded in Timagem I need to go to the database, can not use DIALOGS, only the picture loaded. Well, come on, I managed to open the project here understand, but do not apply too much. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |