Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Embedded image
Message
From
22/11/2018 08:59:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01663614
Message ID:
01663686
Views:
42
img src="data:image/png;base64

would be:

img src="data:image/jpg;base64

then. You need to know the type and you could just checking the extension.

>Many thanks Cetin
>---> If it is JPG then don't forget to use the mime type as JPG instead of PNG.
>Where do I specify mime type as JPG
>These images are displaying in a grid and I wont know in advance the type of image ..they could be anything as they are just pictures related to products so could be .jpg .bmp. etc
>
>Regards,
>Gerard
>
>
>
>>No, "My image here" was just a sample text in the email. m.lcMyPNGFile should have your "C:\Myfolder\MyImage.jpg". If it is JPG then don't forget to use the mime type as JPG instead of PNG.
>>
>>PS: You could have an Shell.explorer (Web Browser) control in VFP where you can preview your message.
>>
>>
>>>Hi Cetin
>>>Thanks for your reply
>>>This Code:
>>>>

My image here


>>>
>>>What is --> My Image here is this a reference to the image I am using (e.g. C:\Myfolder\MyImage.jpg) or someting else ?
>>>
>>>
>>>
>>>
>>>>>Hi
>>>>>I am sending out html email using foxpro. All working fine
>>>>>Now I want to embed(Rather than linked) an image into one of the columns on the html email page
>>>>>Seems to be 2 ways
>>>>>CId Content Id where you also attach the image
>>>>>Base64
>>>>>
>>>>>I am unsure as to the exact code mechanism of either
>>>>>Does anybody have any examples, and maybe ideas on which method is more resilient
>>>>>Tia
>>>>>Gerard
>>>>
>>>>If you are using HTML then base64 is an easy option. ie:
>>>>
>>>>
>>>>text to body texmerge noshow
>>>><p>My image here</p>
>>>><img src="data:image/png;base64, << Strconv(FileToStr(m.lcMyPNGFile),13)  >>" />
>>>>endtext
>>>>
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform