手把手教你如何将图片“嵌入”网页中

手把手教你如何将图片“嵌入”网页中将图片“嵌入”网页中

大家好,又见面了,我是你们的朋友全栈君。

网页必不可少的组成元素是什么?我想所有人都知道是文字和图片。

那么如何向网页中添加图片?会HTMLCSS的同学肯定知道,利用<img>标签插入图片,为src属性指定图片的相对路径,然后将图片放置到那个路径上去就可以了,例如下面的这个简单的HTML代码:

<!DOCTYPEhtml PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd“>

<html>

   <head>

       <meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″>

        <title> HTML内嵌图片教程</title>

   </head>

   <body>

       <img src=”sea.png” width=”800px”height=”510px” alt=”sea” />

   </body>

</html>

再加上一张好看的图片(sea.png):

手把手教你如何将图片“嵌入”网页中 - 远行的风 - 风的驿站

话不多说,下面我们来介绍如何将图片“嵌入”到HTML代码中,这样我们就不需要拷贝图片到指定路径下了,显示整张图片就只需要一个页面文件就可以了。

我们简单说下原理,我们知道,所有东西归根结底都是数据,图片也不例外,图片文件实际是由图片文件头,信息头(有的格式没有),图片数据,图片结束标识(有的格式没有)这些部分组成,在浏览器解析文件的时候,先到src指定的路径下将图片文件读取出来,然后按照图片头定义的文件压缩格式,对图片数据进行读取显示。所以我们可以直接将图片的内容进行编码然后存入HTML文件中即可。

HTML中支持base64编码的数据直接嵌入到网页中,这里提供一个网址,可以在线将文件内容转换为base64编码的数据,点击“choosefile”,然后点击“convertthe source data”,即可生成文件的base64编码数据。网址如下:

http://www.motobit.com/util/base64-decoder-encoder.asp

 

当然我们也可以手动编写一个小工具进行转码,C语言实现的base64编码方法如下:

char*base64_encode(char* in_str)

{

   int i=0;

   charbase64_table[]=”ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/”;

   int curr_out=0;

   if(in_len>0)

   {

       while(i<in_len)

       {

           char a=in_str[i];

           char b=i+1>=in_len?0:in_str[i+1];

           char c=i+2>=in_len?0:in_str[i+2];

           if(i+2<in_len)          /*0*/

           {

               out_str[curr_out++]=base64_table[(a>>2)&(0x3f)];        //the first

               out_str[curr_out++]=base64_table[((a&0x03)<<4)+(b>>4)];   //the first and the second

               out_str[curr_out++]=base64_table[((b&0x0f)<<2)+(c>>6)];   //the second and the third

               out_str[curr_out++]=base64_table[c&0x3f];          //the third

           }

           else if(i+1<in_len)      /*2*/

           {

               out_str[curr_out++]=base64_table[(a>>2)&(0x3f)];   //thefirst

               out_str[curr_out++]=base64_table[((a&0x03)<<4)+(b>>4)]; //the first and the second

               out_str[curr_out++]=base64_table[(b&0x0f)<<2];    //the last low 4 bits of the second

               out_str[curr_out++]=’=’;   //fill with the ‘=’

           }

           else                         /*1*/

           {

               out_str[curr_out++]=base64_table[(a>>2)&(0x3f)];  //the first

               out_str[curr_out++]=base64_table[(a&(0x03))<<4];  //the rest ofof the first

               out_str[curr_out++]=’=’;    //fill with  ‘=’ in the lasttwo bits

               out_str[curr_out++]=’=’;

           }

           i+=3;

       }

       out_str[curr_out]=’\0′;

   }

   return out_str;

};

调用时将文件内容读入char*,然后作为函数参数传入,函数的返回值即为编码后的结果。

这里我们将限于篇幅,将图像缩小为30像素×18像素后,得到的编码如下(仍然很多):

iVBORw0KGgoAAAANSUhEUgAAAB4AAAASCAYAAABM8m7ZAAAMRGlDQ1BJQ0MgUHJvZmlsZQAASA2tV3dUU8kXvq8kgZCEEoiAlNCbKL1K74KCVGEthCSQUGIIBBW767IKrgUVC5YVXRWxrQWQtSBid1HsrmVRFwVlXSzYUPnNC8U9e3b/+71zZt73vnvnvu/emTdnHoCmrUAuz8W1APJkhYr4iGD+hNQ0PuMB0EAHeGAFdIGwQB4UFxcD/3m9vQkYZbzmSMX6T7d/N2iLxAVCACwOmTNEBcI8hA8BkByhXFEIQGtGvMW0QjmFOxDWVSCBCH+icJYK05F60M3ox5Yqn8T4EAC6F4AaSyBQZAFwQhHPLxJmoTgcEcJOMpFUhvAqhP2FEgHiONcRHpGXNxVhTQTBNuNv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ICRGr3NZ9c+dc12CxPUaCPkw++zzRbtECiKYs1292GICmYLtTkq9ALHPdyy2k5jre9mGCjnVKA8MxomuXaZICPmgoqqujOL9G2sjPvpOKDlrCImVUQ/m++/+dbNzcyUrrZFonSSalw0kK2l9aSqjXGhXRMTMNDaxOoFDhvQcyHEQj/pmES+641FPAzkswu8m2jsZC+FkFWR5UogZSCV5RnmyhRVmFabL1/IG2xzhzZqndbzsK4bD17qUZ8AVQT208wWWoR1m3XT+TohGaDGMIBYW9Y2py3pf8v08CPSFznwduZq1ALZSkVVlHNFqMimW/wZaW0zVdq5qN1aQ9d/vas6ln+zVlOlETPBLHXJSciQge9zghOvQLrSKIAHJODXzNiSjGEKMofYl7I/YyRzpRM5f5DSRHujbQ3SKdUX39FkkGowGqsbZUrysZIs0Z53QxARoOALg77w6xIwAAgC1M85y7OM6VRBZuZ96P0bKk8ApWmdn0i+gbGmczBnGa3e31ZaO6DDb7TV7Ax1kF6uPH6s8aBP3fzXSQbjguwALr8wkArG1oPyXGRays1XT8Fe3yf+PghRCjx/2Szl3acP2WJS+iBae9JTZ+E5jX5eFpP9cntFSX+t7MEsZ1yZSWkGIW/hD5eSvpbaA7/uSJLhhOEzmzOIKYo3ajk5YGJ9At4XDBg2ceHupBgobs4q7gTagvXK6opMMQKnygGUrdTZ6+uLlEjopfKBCupZlpSARCIjX1ukZkz5z60/7ACnfUoScP6nvl6VKDPTWjx1Wklc0+3bdxjwUxozXUaToRz1yR1tEHnjJGQzKsF8UG8kC5jjvwJPoJTd50+djUN+T9ITyNNSAe8DoPnxb05/Ay+w33iYfIMcAAAAAElFTkSuQmCC

 

然后,我们修改之前的HTML页面中的img标签如下:

<img src=”data:image/png;base64, [这里把上面的base64编码替换进来(包括左右的中括号)]”width=”30px” height=”1px” alt=”sea” />

然后保存,测试一下结果,发现图片已经嵌入到页面中了:

手把手教你如何将图片“嵌入”网页中 - 远行的风 - 风的驿站

以上就是嵌入图片的方法,我们看到,其实就是将图片的数据嵌入到了页面中,使用这种方法会显著增加HTML文件的大小,如果不是非常小的图片或者十分有必要这么做的情况下,我们尽量不要使用这种方式。

我们最后看一下“data:image/png;base64,”这个写法,这句表明我们嵌入的是png格式image文件,使用的是base64编码,那么你肯定猜到了,还有很多别的资源也能够被这样嵌入到页面中,具体格式在下面列出:

123application/vnd.lotus-1-2-3 

3gpvideo/3gpp 

aabapplication/x-authoware-bin 

aamapplication/x-authoware-map 

aasapplication/x-authoware-seg 

aiapplication/postscript 

aifaudio/x-aiff 

aifcaudio/x-aiff 

aiffaudio/x-aiff 

alsaudio/X-Alpha5 

amcapplication/x-mpeg 

aniapplication/octet-stream 

asctext/plain 

asdapplication/astound 

asfvideo/x-ms-asf 

asnapplication/astound 

aspapplication/x-asap 

asxvideo/x-ms-asf 

auaudio/basic 

avbapplication/octet-stream 

avivideo/x-msvideo 

awbaudio/amr-wb 

bcpioapplication/x-bcpio 

binapplication/octet-stream 

bldapplication/bld 

bld2application/bld2 

bmpapplication/x-MS-bmp 

bpkapplication/octet-stream 

bz2application/x-bzip2 

calimage/x-cals 

ccnapplication/x-cnc 

ccoapplication/x-cocoa 

cdfapplication/x-netcdf 

cgimagnus-internal/cgi 

chatapplication/x-chat 

classapplication/octet-stream 

clpapplication/x-msclip 

cmxapplication/x-cmx 

coapplication/x-cult3d-object 

codimage/cis-cod 

cpioapplication/x-cpio 

cptapplication/mac-compactpro 

crdapplication/x-mscardfile 

cshapplication/x-csh 

csmchemical/x-csml 

csmlchemical/x-csml 

css text/css 

curapplication/octet-stream 

dcmx-lml/x-evm 

dcrapplication/x-director 

dcximage/x-dcx 

dhtmltext/html 

dirapplication/x-director 

dllapplication/octet-stream 

dmgapplication/octet-stream 

dmsapplication/octet-stream 

docapplication/msword 

dotapplication/x-dot 

dviapplication/x-dvi 

dwfdrawing/x-dwf 

dwgapplication/x-autocad 

dxfapplication/x-autocad 

dxrapplication/x-director 

ebkapplication/x-expandedbook 

embchemical/x-embl-dl-nucleotide 

emblchemical/x-embl-dl-nucleotide 

epsapplication/postscript 

eriimage/x-eri 

esaudio/echospeech 

eslaudio/echospeech 

etcapplication/x-earthtime 

etxtext/x-setext 

evmx-lml/x-evm 

evyapplication/x-envoy 

exeapplication/octet-stream 

fh4image/x-freehand 

fh5image/x-freehand 

fhcimage/x-freehand 

fifimage/fif 

fmapplication/x-maker 

fpximage/x-fpx 

fvivideo/isivideo 

gauchemical/x-gaussian-input 

gcaapplication/x-gca-compressed 

gdbx-lml/x-gdb 

gifimage/gif 

gpsapplication/x-gps 

gtarapplication/x-gtar 

gzapplication/x-gzip 

hdfapplication/x-hdf 

hdmtext/x-hdml 

hdmltext/x-hdml 

hlpapplication/winhlp 

hqxapplication/mac-binhex40 

htmtext/html 

htmltext/html 

htstext/html 

icex-conference/x-cooltalk 

icoapplication/octet-stream 

iefimage/ief 

ifmimage/gif 

ifsimage/ifs 

imyaudio/melody 

insapplication/x-NET-Install 

ipsapplication/x-ipscript 

ipxapplication/x-ipix 

itaudio/x-mod 

itzaudio/x-mod 

ivri-world/i-vrml 

j2kimage/j2k 

jadtext/vnd.sun.j2me.app-descriptor 

jamapplication/x-jam 

jarapplication/java-archive 

jnlpapplication/x-java-jnlp-file 

jpeimage/jpeg 

jpegimage/jpeg 

jpgimage/jpeg 

jpzimage/jpeg 

jsapplication/x-javascript 

jwcapplication/jwc 

kjxapplication/x-kjx 

lakx-lml/x-lak 

latexapplication/x-latex 

lccapplication/fastman 

lclapplication/x-digitalloca 

lcrapplication/x-digitalloca 

lghapplication/lgh 

lhaapplication/octet-stream 

lmlx-lml/x-lml 

lmlpackx-lml/x-lmlpack 

lsfvideo/x-ms-asf 

lsxvideo/x-ms-asf 

lzhapplication/x-lzh 

m13application/x-msmediaview 

m14application/x-msmediaview 

m15audio/x-mod 

m3uaudio/x-mpegurl 

m3urlaudio/x-mpegurl 

ma1audio/ma1 

ma2audio/ma2 

ma3audio/ma3 

ma5audio/ma5 

manapplication/x-troff-man 

mapmagnus-internal/imagemap 

mbdapplication/mbedlet 

mctapplication/x-mascot 

mdbapplication/x-msaccess 

mdzaudio/x-mod 

meapplication/x-troff-me 

meltext/x-vmel 

miapplication/x-mif 

midaudio/midi 

midiaudio/midi 

mifapplication/x-mif 

milimage/x-cals 

mioaudio/x-mio 

mmfapplication/x-skt-lbs 

mngvideo/x-mng 

mnyapplication/x-msmoney 

mocapplication/x-mocha 

mochaapplication/x-mocha 

modaudio/x-mod 

mofapplication/x-yumekara 

molchemical/x-mdl-molfile 

mopchemical/x-mopac-input 

movvideo/quicktime 

movievideo/x-sgi-movie 

mp2audio/x-mpeg 

mp3audio/x-mpeg 

mp4video/mp4 

mpcapplication/vnd.mpohun.certificate 

mpevideo/mpeg 

mpegvideo/mpeg 

mpgvideo/mpeg 

mpg4video/mp4 

mpgaaudio/mpeg 

mpnapplication/vnd.mophun.application 

mppapplication/vnd.ms-project 

mpsapplication/x-mapserver 

mrltext/x-mrml 

mrmapplication/x-mrm 

msapplication/x-troff-ms 

mtsapplication/metastream 

mtxapplication/metastream 

mtzapplication/metastream 

mzvapplication/metastream 

narapplication/zip 

nbmpimage/nbmp 

ncapplication/x-netcdf 

ndbx-lml/x-ndb 

ndwnapplication/ndwn 

nifapplication/x-nif 

nmzapplication/x-scream 

nokia-op-logoimage/vnd.nok-oplogo-color 

npxapplication/x-netfpx 

nsndaudio/nsnd 

nvaapplication/x-neva1 

odaapplication/oda 

oomapplication/x-AtlasMate-Plugin 

pacaudio/x-pac 

paeaudio/x-epac 

panapplication/x-pan 

pbmimage/x-portable-bitmap 

pcximage/x-pcx 

pdaimage/x-pda 

pdbchemical/x-pdb 

pdfapplication/pdf 

pfrapplication/font-tdpfr 

pgmimage/x-portable-graymap 

pictimage/x-pict 

pmapplication/x-perl 

pmdapplication/x-pmd 

pngimage/png 

pnmimage/x-portable-anymap 

pnzimage/png 

potapplication/vnd.ms-powerpoint 

ppmimage/x-portable-pixmap 

ppsapplication/vnd.ms-powerpoint 

pptapplication/vnd.ms-powerpoint 

pqfapplication/x-cprplayer 

pqiapplication/cprplayer 

prcapplication/x-prc 

proxyapplication/x-ns-proxy-autoconfig 

psapplication/postscript 

ptlkapplication/listenup 

pubapplication/x-mspublisher 

pvxvideo/x-pv-pvx 

qcpaudio/vnd.qcelp 

qtvideo/quicktime 

qtiimage/x-quicktime 

qtifimage/x-quicktime 

r3ttext/vnd.rn-realtext3d 

raaudio/x-pn-realaudio 

ramaudio/x-pn-realaudio 

rarapplication/x-rar-compressed 

rasimage/x-cmu-raster 

rdfapplication/rdf+xml 

rfimage/vnd.rn-realflash 

rgbimage/x-rgb 

rlfapplication/x-richlink 

rmaudio/x-pn-realaudio 

rmfaudio/x-rmf 

rmmaudio/x-pn-realaudio 

rmvbaudio/x-pn-realaudio 

rnxapplication/vnd.rn-realplayer 

roffapplication/x-troff 

rpimage/vnd.rn-realpix 

rpmaudio/x-pn-realaudio-plugin 

rttext/vnd.rn-realtext 

rtex-lml/x-gps 

rtfapplication/rtf 

rtgapplication/metastream 

rtxtext/richtext 

rvvideo/vnd.rn-realvideo 

rwcapplication/x-rogerwilco 

s3maudio/x-mod 

s3zaudio/x-mod 

scaapplication/x-supercard 

scdapplication/x-msschedule 

sdfapplication/e-score 

seaapplication/x-stuffit 

sgmtext/x-sgml 

sgmltext/x-sgml 

shapplication/x-sh 

sharapplication/x-shar 

shtmlmagnus-internal/parsed-html 

shwapplication/presentations 

si6image/si6 

si7image/vnd.stiwap.sis 

si9image/vnd.lgtwap.sis 

sisapplication/vnd.symbian.install 

sitapplication/x-stuffit 

skdapplication/x-Koan 

skmapplication/x-Koan 

skpapplication/x-Koan 

sktapplication/x-Koan 

slcapplication/x-salsa 

smdaudio/x-smd 

smiapplication/smil 

smilapplication/smil 

smpapplication/studiom 

smzaudio/x-smd 

sndaudio/basic 

spctext/x-speech 

splapplication/futuresplash 

sprapplication/x-sprite 

spriteapplication/x-sprite 

sptapplication/x-spt 

srcapplication/x-wais-source 

stkapplication/hyperstudio 

stmaudio/x-mod 

sv4cpioapplication/x-sv4cpio 

sv4crcapplication/x-sv4crc 

svfimage/vnd 

svgimage/svg-xml 

svhimage/svh 

svrx-world/x-svr 

swfapplication/x-shockwave-flash 

swflapplication/x-shockwave-flash 

tapplication/x-troff 

tadapplication/octet-stream 

talktext/x-speech 

tarapplication/x-tar 

tazapplication/x-tar 

tbpapplication/x-timbuktu 

tbtapplication/x-timbuktu 

tclapplication/x-tcl 

texapplication/x-tex 

texiapplication/x-texinfo 

texinfoapplication/x-texinfo 

tgzapplication/x-tar 

thmapplication/vnd.eri.thm 

tifimage/tiff 

tiffimage/tiff 

tkiapplication/x-tkined 

tkinedapplication/x-tkined 

tocapplication/toc 

toyimage/toy 

trapplication/x-troff 

trkx-lml/x-gps 

trmapplication/x-msterminal 

tsiaudio/tsplayer 

tspapplication/dsptype 

tsvtext/tab-separated-values 

tsvtext/tab-separated-values 

ttfapplication/octet-stream 

ttzapplication/t-time 

txttext/plain 

ultaudio/x-mod 

ustarapplication/x-ustar 

uuapplication/x-uuencode 

uueapplication/x-uuencode 

vcdapplication/x-cdlink 

vcftext/x-vcard 

vdovideo/vdo 

vibaudio/vib 

vivvideo/vivo 

vivovideo/vivo 

vmdapplication/vocaltec-media-desc 

vmfapplication/vocaltec-media-file 

vmiapplication/x-dreamcast-vms-info 

vmsapplication/x-dreamcast-vms 

voxaudio/voxware 

vqeaudio/x-twinvq-plugin 

vqfaudio/x-twinvq 

vqlaudio/x-twinvq 

vrex-world/x-vream 

vrmlx-world/x-vrml 

vrtx-world/x-vrt 

vrwx-world/x-vream 

vtsworkbook/formulaone 

wavaudio/x-wav 

waxaudio/x-ms-wax 

wbmpimage/vnd.wap.wbmp 

webapplication/vnd.xara 

wiimage/wavelet 

wisapplication/x-InstallShield 

wmvideo/x-ms-wm 

wmaaudio/x-ms-wma 

wmdapplication/x-ms-wmd 

wmfapplication/x-msmetafile 

wmltext/vnd.wap.wml 

wmlcapplication/vnd.wap.wmlc 

wmlstext/vnd.wap.wmlscript 

wmlscapplication/vnd.wap.wmlscriptc 

wmlscripttext/vnd.wap.wmlscript 

wmvaudio/x-ms-wmv 

wmxvideo/x-ms-wmx 

wmzapplication/x-ms-wmz 

wpngimage/x-up-wpng 

wptx-lml/x-gps 

wriapplication/x-mswrite 

wrlx-world/x-vrml 

wrzx-world/x-vrml 

wstext/vnd.wap.wmlscript 

wscapplication/vnd.wap.wmlscriptc 

wvvideo/wavelet 

wvxvideo/x-ms-wvx 

wxlapplication/x-wxl 

x-gzipapplication/x-gzip 

xarapplication/vnd.xara 

xbmimage/x-xbitmap 

xdmapplication/x-xdma 

xdmaapplication/x-xdma 

xdwapplication/vnd.fujixerox.docuworks 

xhtapplication/xhtml+xml 

xhtmapplication/xhtml+xml 

xhtmlapplication/xhtml+xml 

xlaapplication/vnd.ms-excel 

xlcapplication/vnd.ms-excel 

xllapplication/x-excel 

xlmapplication/vnd.ms-excel 

xlsapplication/vnd.ms-excel 

xltapplication/vnd.ms-excel 

xlwapplication/vnd.ms-excel 

xmaudio/x-mod 

xml text/xml 

xmzaudio/x-mod 

xpiapplication/x-xpinstall 

xpmimage/x-xpixmap 

xsittext/xml 

xsl text/xml 

xul text/xul 

xwdimage/x-xwindowdump 

xyzchemical/x-pdb 

yz1application/x-yz1 

zapplication/x-compress 

zacapplication/x-zaurus-zac 

zipapplication/zip

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/140826.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(1)


相关推荐

  • java代码运行简单js方法案例

    java代码运行简单js方法案例java代码运行简单js方法案例

  • python3.x默认使用UTF-8编码_pycharm怎么debug

    python3.x默认使用UTF-8编码_pycharm怎么debugpycharm设置默认的UTF-8编码模式!

  • jwplayer免费手机版_视频上显示jwplayer

    jwplayer免费手机版_视频上显示jwplayer————————————2015-5-13————最新更新———————————————由于jwplayer6已经完全无法正常工作,以下介绍的方法也已经失效,请更换视频播放插件,可以参考楼主的文章:http://blog.csdn.net/snow_finland/article/details/45670683————————————————————————————————————————htm…

    2022年10月21日
  • pycharm如何配置anaconda环境_2022年冬奥会在哪举行

    pycharm如何配置anaconda环境_2022年冬奥会在哪举行这是2022年我自己记录的Pycharm+Anaconda配置教程,还有一些安装时遇到的疑惑浅析。

  • linux安装配置Mysql详细步骤

    linux安装配置Mysql详细步骤下载Mysqlrpm包官网下载:https://dev.mysql.com/downloads/mysql/如果你到了这里,本地应该有了如下四个rpm包:mysql-community-client-5.7.26-1.el6.x86_64.rpmmysql-community-common-5.7.26-1.el6.x86_64.rpmmysql-community-libs-5…

  • 二维数组和指针_二维数组与指针

    二维数组和指针_二维数组与指针二维数组和指针⑴用指针表示二维数组元素。要用指针处理二维数组,首先要解决从存储的角度对二维数组的认识问题。我们知道,一个二维数组在计算机中存储时,是按照先行后列的顺序依次存储的,当把每一行看作一个整体,即视为一个大的数组元素时,这个存储的二维数组也就变成了一个一维数组了。而每个大数组元素对应二维数组的一行,我们就称之为行数组元素,显然每个行数组元素都是一个一维数组下面我们讨论指针和二维数组元

    2022年10月26日

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号