-
Copy As Markdown Offered by: johnnyfee.github.io https://chrome.google.com/webstore/detail/copy-as-markdown/dgoenpnkphkichnohepecnmpmihnabdg Used to copy the element in current page as markdown format. Just select HTML in your page and then click the the 'M' icon in the extension toolbar, then the markdown content is in your clipboard. Cool? Also, you can use the shortcut of the extension,
Alt + C
for Windows orOption + C
for Mac or define yourself. Enjoy it. History: 2016.06.21 fix a bug, change relative links to absolute links. -
Base64 Encode and Decode Offered by: oneit.se Quickly Encode & Decode Base64 strings This Chrome extenstion is a simple Base64 encoder and decoder. Encode and Decode inline strings from any page by selecting and right clicking on the selection. Encodes or decodes a string so that it conforms to the Base64 Data Encodings specification (RFC 4648). Base64 is not for encryption purposes and is not secure. It is an encoding mechanism only. https://chrome.google.com/webstore/detail/base64-encode-and-decode/kcafoaahiffdjffagoegkdiabclnkbha
-
copy-base64 Offered by: 0-9.tumblr.com https://chrome.google.com/webstore/detail/copy-base64/obeffifkdkfbpodhaoelcjdljgiapjnl Copy the image to the Clipboard in Base64 format. see source https://github.com/kyo-ago/copy-base64
-
Images to base64 Offered by: Paweł Psztyć https://chrome.google.com/webstore/detail/images-to-base64/ieedflcjddanicndmocomefhpggfbbmm Replaces all images on the page with base64 dataUrl representation. It helps you pass CORS restrictions while developing a webpage. Picture encoder helps You replace static image files to base64 string representation.
-
Image2Base64 Offered by: wemakesites.net Convert images to base64 data URIs Image2Base64 is an online tool, provided by Acid.JS Web.UI for conversion of image files to base64 data URIs. It implements the new HTML5 file API, and the selected images are processed entirely on the client without uploading them onto the server.
-
-
Save laris/b54f255d151d9a0446e64a05b4592e65 to your computer and use it in GitHub Desktop.
https://my.oschina.net/ClownNose/blog/1619946 ClownNose https://my.oschina.net/ClownNose 发布于 02/07 23:45 Tags:
插图最基础的格式就是:
![Alt text](图片链接 "optional title")
Alt text:图片的Alt标签,用来描述图片的关键词,可以不写。最初的本意是当图片因为某种原因不能被显示时而出现的替代文字,后来又被用于SEO,可以方便搜索引擎根据Alt text里面的关键词搜索到图片。 图片链接:可以是图片的本地地址或者是网址。"optional title":鼠标悬置于图片上会出现的标题文字,可以不写。
只需要在基础语法的括号中填入图片的位置路径即可,支持绝对路径和相对路径。 例如:
![avatar](/home/picture/1.png)
不灵活不好分享,本地图片的路径更改或丢失都会造成markdown文件调不出图。
只需要在基础语法的括号中填入图片的网络链接即可,现在已经有很多免费/收费图床和方便传图的小工具可选。
例如:
![avatar](http://baidu.com/pic/doge.png)
将图片存在网络服务器上,非常依赖网络。
用base64转码工具把图片转成一段字符串,然后把字符串填到基础格式中链接的那个位置。
- 基础用法:
![avatar](data:image/png;base64,iVBORw0......)
这个时候会发现插入的这一长串字符串会把整个文章分割开,非常影响编写文章时的体验。如果能够把大段的base64字符串放在文章末尾,然后在文章中通过一个id来调用,文章就不会被分割的这么乱了。 - 高级用法
比如:
![avatar][base64str]
[base64str]:data:image/png;base64,iVBORw0......
- 使用python将图片转化为base64字符串
import base64
f=open('723.png','rb') #二进制方式打开图文件
ls_f=base64.b64encode(f.read()) #读取文件内容,转换为base64编码
f.close()
print(ls_f)
- base64字符串转化为图片
import base64
bs='iVBORw0KGgoAAAANSUhEUg....' # 太长了省略
imgdata=base64.b64decode(bs)
file=open('2.jpg','wb')
file.write(imgdata)
file.close()
Admittedly, it’s fairly difficult to devise a “natural” syntax for placing images into a plain text document format.
Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference.
Inline image syntax looks like this:
![Alt text](/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional title")
That is:
- An exclamation mark:
!
; - followed by a set of square brackets, containing the
alt
attribute text for the image; - followed by a set of parentheses, containing the URL or path to
the image, and an optional
title
attribute enclosed in double or single quotes.
Reference-style image syntax looks like this:
![Alt text][id]
Where “id” is the name of a defined image reference. Image references are defined using syntax identical to link references:
[id]: url/to/image "Optional title attribute"
As of this writing, Markdown has no syntax for specifying the
dimensions of an image; if this is important to you, you can simply
use regular HTML <img>
tags.