by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Images
Introduced first in SolidGeometry 5.4, Creation date: 2024-07-14, Last change: 2025-09-15
See Also: str2codelines
, hexstr2str
, hexstr2uint8
, str2hexsstr
, mfile2mlxfile4markup
str=image2strbase64(fname,[width])
fname: | filename, weblink oder image array | |
width: | desired with for rescale/resize |
str: | base64 string |
image2strbase64("https://www.mec.ed.tum.de/fileadmin/w00cbp/mimed/Matlab_Toolboxes/SGPIC/SGPIC_4027.JPG",320) % call using an url to an image
image2strbase64("/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/WIN AIM Matlab Datenbank Lueth PICS/SGPIC_3919.JPG") % call using a file
I=webread("https://www.mec.ed.tum.de/fileadmin/w00cbp/mimed/Matlab_Toolboxes/SGPIC/SGPIC_4027.JPG");
image2strbase64(I,640) % call using an image