透過網頁讀取Photoshop PSD檔案內容
在專案中有需要透過網頁來讀取Photoshop PSD檔案的內部資訊,我們透過PSD.js(備用載點)來實現這樣的功能,在官方提供的功能展示頁中,我們可以看到在頁面中只需引入psd.min.js後,加入透過少量的Javascript就可以針對PSD進行解析。
<!DOCTYPE html> <html> <head> <title>psd.js image example</title> <style type="text/css"> body, html { padding: 0; margin: 0; } #dropzone { width: 500px; height: 100px; border: 1px #ababab dashed; margin: 50px auto; } #dropzone p { text-align: center; line-height: 100px; margin: 0; padding: 0; } #image { text-align: center; } </style> <script type="text/javascript" src="psd.min.js"></script> </head> <body> <div id="dropzone"> <p>Drop here</p> </div> <div id="image"></div> <pre id="data"></pre> <script type="text/javascript"> (function () { var PSD = require('psd'); document.getElementById('dropzone').addEventListener('dragover', onDragOver, true); document.getElementById('dropzone').addEventListener('drop', onDrop, true); function onDragOver(e) { e.stopPropagation(); e.preventDefault(); e.dataTransfer.dropEffect = 'copy'; } function onDrop(e) { e.stopPropagation(); e.preventDefault(); PSD.fromEvent(e).then(function (psd) { var data = JSON.stringify(psd.tree().export(), undefined, 2); document.getElementById('data').innerHTML = data; document.getElementById('image').appendChild(psd.image.toPng()); }); } }()); </script> </body> </html>
我們透過下圖這樣的一個PSD檔案對頁面進行測試,檔案中共有三個圖層,包含一個文字圖層。
頁面將PSD分析出結果後,以json格式顯示在頁面上,可以看到文字圖層的部分,不僅能讀到圖層名稱也包含文字內容和字型名稱。
{ "children": [ { "type": "layer", "visible": true, "opacity": 1, "blendingMode": "normal", "name": "Photoshop Text", "left": 302, "right": 723, "top": 90, "bottom": 128, "height": 38, "width": 421, "mask": {}, "text": { "value": "THIS IS TEXT LAYER", "font": { "name": "MyriadPro-Regular\u0000", "sizes": [ 53 ], "colors": [ [ 0, 0, 0, 255 ] ], "alignment": [ "center" ] }, "left": 0, "top": 0, "right": 0, "bottom": 0, "transform": { "xx": 1, "xy": 0, "yx": 0, "yy": 1, "tx": 513, "ty": 127 } }, "image": {} }, { "type": "layer", "visible": true, "opacity": 1, "blendingMode": "normal", "name": "PSD Icon", "left": 287, "right": 738, "top": 209, "bottom": 669, "height": 460, "width": 451, "mask": {}, "image": {} }, { "type": "layer", "visible": true, "opacity": 1, "blendingMode": "normal", "name": "Background", "left": 0, "right": 1024, "top": 0, "bottom": 800, "height": 800, "width": 1024, "mask": {}, "image": {} } ], "document": { "width": 1024, "height": 800, "resources": { "layerComps": [], "guides": [], "slices": [] } } }
Why do we need a Healthcare Electronic Software?
Medicine is one of the oldest professions. The first physicians recorded medical data first by using papyrus or parchment to preserve written information. In 1650, one man designed and built a medical computer which is called the EAR. This computer was built by Emmanuel Lebret who was backed by one of the greatest Insulin inventor, Dr Andreas Libavius.
In modern terms, a clinical knowledge management system refers to any enterprise- https://indiatownship.com/wp-content/uploads/2022/06/caidif.pdf
ec5d62056f rafgill
The media pendulum is continuously swinging, even if it has been at a slower pace in certain aspects than it would have been when it starts to swing on average cycle. Therefore, now is the right time for digital music fans who are looking for a solution that allows them to personalize their streaming experience by offering customizable, multi-room Plex Home Theater support.
In 2014 the media pendulum took the average cycle to its extreme by bringing consumer-grade devices into the average home’s http://one-health24.com/wp-content/uploads/2022/06/leirana.pdf
ec5d62056f orfogran
hydroxychloroquine 400mg oral – chloroquine online order baricitinib 2mg without prescription
https://wakelet.com/wake/xfmQai8zaxTQvrSKqL31A
f77fa6ce17 zacagil
The product is designed with the remote in mind, so that your mouse can be used to control and adjust volume. As such, the remote is surprisingly well-built. With four buttons, it can be easily used in conjunction with your mouse. It is covered in bright finish to go well with any device. Small, solid and easy to use, it is perfect for those on the move. The shape of the device itself looks somewhat rounded, and also has a USB-A port on https://www.buddhistchurchesofamerica.org/profile/Android-Language-Project-Full-2021/profile
66cf4387b8 wlyncle
order lasix 100mg pill – buy furosemide 100mg pills ivermectin usa
Best Free Audio Converter
The best audio converter is one that will make my audio work and a good one at that, I don’t pay money to convert my music files, I want the work to be done effortlessly without spending a fortune! I have tried a lot of converters and this is by far the best one, in terms of both audio quality and speed. Also, the audio quality after conversion is pristine and I can play my music anywhere! I am a https://www.legumestranslated.eu/profile/grazsisriupringende/profile
66cf4387b8 orscar
purchase lasix – order generic lasix ivermectin for sale online
With Xor, enciphering files with a specific key is easy, and can be done by using the /c switch. Within the command line, the user is required to put in the infos they want to be enciphered through the /k switch, and specified as a string.
After that, a second and third switch follows, to specify that which bits of text need to be enciphered, and using the /x switch. For instance, a string of text https://www.sport-break.fr/profile/Ek-Daav-Dhobi-Pachad-Marathi-Movie-Download-LINK/profile
66cf4387b8 crismari
The lack of features keeps the application from being more than good, unless you plan on using it to get a bit of knowledge on a few scales and modes.
FtEditor is an SFX editor and provides basic functionalities, but only as a template. It can be used to edit the original SFX file contained in a DXF or built in, but this is very limited. You can use it to edit the position of the SFX file in the shot, so we can find https://www.radiodoumdoum.com/profile/asfrantabobricomp/profile
99d5d0dfd0 ulrhun
order furosemide 100mg pill – oral doxycycline 100mg stromectol price
prednisolone 10mg usa – buy gabapentin sale sildenafil 100mg drug
prednisolone 5mg canada – generic prednisolone 5mg sildenafil 100mg
cost prednisolone 10mg – purchase gabapentin without prescription buy sildenafil 150mg pills
order generic amoxil 250mg – amoxil online order order generic sildenafil 150mg
amoxil online – azithromycin 250mg cheap sildenafil 25 mg
amoxicillin online – order azithromycin 500mg buy viagra 150mg without prescription
deltasone buy online – order prednisone 10mg generic buy accutane 10mg generic
cialis free trial voucher buy tadalafil cialis with dapoxetine to buy uk
deltasone 10mg cost – order isotretinoin 20mg generic order isotretinoin 10mg sale
contoh surat rasmi permohonan tapak jualan
bd86983c93 windsaby
Windows 7Loader by Orbit30 And Hazar 32,64Bit v1.5 setup free
bd86983c93 melwick
Pb Downforce 0.3.3.1 Anti Ban Sx
bd86983c93 queacomi
download xforce keygen AutoCAD LT 2014 activation
bd86983c93 darpal
cialis 10mg generic buy tadalafil cialis generic 10 mg
Origin Pro 10.5.28.13288 Crack Plus Activation Code
bd86983c93 fyntea
cost deltasone 40mg – deltasone 10mg ca order isotretinoin 20mg generic
I don’t normally comment but I gotta say appreciate it for the post on this one : D.
orange for oracle 6.0 keygen
bd86983c93 deitkama
Of course, what a great site and informative posts, I will add backlink – bookmark this site? Regards, Reader