透過網頁讀取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": [] } } }
Множество вариантов фурнитуры для плинтуса, найдите идеальный вариант.
Прочные материалы для плинтуса, гарантия долгого срока службы.
Удобство монтажа фурнитуры для плинтуса, для быстрой установки.
Современные решения для отделки плинтуса, подчеркните стиль своего интерьера.
Фурнитура для плинтуса из экологически чистых материалов, сделайте свой дом более безопасным для здоровья.
Тренды в оттенках для декора плинтуса, создайте гармонию в доме.
Уникальные элементы для стильного плинтуса, выразите свою индивидуальность через дизайн.
Подсказки по правильной установке элементов плинтуса, чтобы сделать правильный выбор.
Декоративные элементы для фурнитуры плинтуса, выдержите общий стиль в каждой детали.
Фурнитура для плинтуса в классическом стиле, подчеркните изысканный вкус в дизайне.
фурнитура для плинтуса https://furnituradlyaplintusamsk.ru/ .
Разнообразие фурнитуры для плинтуса, найдите идеальный вариант.
Прочные материалы для плинтуса, гарантия долгого срока службы.
Легкость сборки плинтуса, без лишних усилий.
Модные элементы для украшения плинтуса, подчеркните стиль своего интерьера.
Фурнитура для плинтуса из экологически чистых материалов, для заботы об окружающей среде.
Популярные цветовые решения для фурнитуры плинтуса, подчеркните цветовую гамму своего интерьера.
Эксклюзивные варианты фурнитуры для плинтуса, привнесите уникальность в интерьер.
Подсказки по правильной установке элементов плинтуса, чтобы сделать правильный выбор.
Стильные детали для украшения плинтуса, создайте уютный и стильный дом.
Изысканные решения для отделки плинтуса, сделайте свой дом роскошным и элегантным.
плинтуса и комплектующие https://furnituradlyaplintusamsk.ru/ .
вывод из запоя в ростове на дону [url=www.vyvod-iz-zapoya-rostov224.ru/]вывод из запоя в ростове на дону[/url] .
sweet bonanza giris: sweet bonanza – sweet bonanza demo oyna
https://slotsiteleri25.com/# slot siteleri
deneme bonusu veren yeni siteler yat?r?ms?z deneme bonusu veren siteler yat?r?ms?z deneme bonusu veren siteler
https://slotsiteleri25.com/# guvenilir slot siteleri
stamp maker online free stamp maker online free .
вывод из запоя вывод из запоя .
denemebonusuverensiteler25: yat?r?ms?z deneme bonusu veren siteler – denemebonusuverensiteler25
Шлюхи донецк : Сексуальные женщины
В городе Луганск можно найти множество индивидуалок, предлагающих сексуальные сервисы. Эти привлекательные девушки отличаются многообразием внешности и личностных качеств, что позволяет выбрать компанию на любой вкус. Они рады быть рядом на мероприятиях, предоставляя не только физическое удовольствие, но и интересное общение.
Каждая из них гарантирует высокий уровень конфиденциальности и профессионализма, создавая атмосферу доверия и комфорта. Индивидуалки Луганска оказывают сервисы, адаптированные под желания клиентов, что делает встречу незабываемой и приятной.
deneme bonusu veren siteler yeni: deneme bonusu veren siteler yeni – yeni deneme bonusu veren siteler
https://sweetbonanza25.com/# sweet bonanza guncel
https://sweetbonanza25.com/# sweet bonanza kazanma saatleri
Широкий выбор фурнитуры для плинтуса, подберите под свой интерьер вариант.
Надежные элементы для плинтуса, гарантия долгого срока службы.
Легкость сборки плинтуса, для быстрой установки.
Современные решения для отделки плинтуса, сделайте дом уютным и стильным.
Природные решения для отделки плинтуса, экологичный выбор для вашего дома.
Модные цвета для элементов плинтуса, создайте гармонию в доме.
Уникальные элементы для стильного плинтуса, выразите свою индивидуальность через дизайн.
Рекомендации по заботе о фурнитуре для плинтуса, чтобы сделать правильный выбор.
Креативные решения для отделки плинтуса, создайте уютный и стильный дом.
Элегантные элементы для стильного плинтуса, сделайте свой дом роскошным и элегантным.
фурнитура для плинтуса мдф фурнитура для плинтуса мдф .
http://sweetbonanza25.com/# sweet bonanza demo oyna
slot siteleri: slot casino siteleri – en cok kazand?ran slot oyunlar?
Unlock Your Financial Potential with Puffer Finance
In an ever-evolving economic landscape, finding the right financial partner is essential for achieving your investment goals. Puffer Finance stands out as a beacon of innovation and stability, offering a plethora of opportunities to enhance your wealth.
puffer finance
Why Choose Puffer Finance?
Choosing the right financial institution is pivotal in ensuring the security and growth of your investments. Here are compelling reasons to partner with Puffer Finance:
Innovative Financial Solutions: Puffer Finance provides cutting-edge options tailored to meet diverse investment needs.
Expert Guidance: Harness the wisdom of experienced finance professionals dedicated to optimizing your portfolio.
Robust Security Measures: Your investments are well-protected, ensuring peace of mind amidst market fluctuations.
Services Offered by Puffer Finance
Puffer Finance prides itself on offering a wide range of services, each designed to cater to specific client needs and financial ambitions. These include:
1. Investment Management
Our thorough investment management services provide strategic planning and execution to enhance your portfolio’s performance.
2. Personal Financial Planning
Whether you are saving for retirement or planning a major purchase, our personal financial planning services are tailored to help you achieve your ambitions.
3. Wealth Preservation Strategies
We offer strategies that not only aim to grow your wealth but also safeguard it against potential risks.
Getting Started with Puffer Finance
Embarking on your financial journey with Puffer Finance is a seamless process. Simply to explore how we can help tailor financial strategies to your individual needs. With Puffer Finance, you are not just investing your money; you are investing in a future laden with possibilities.
Testimonials from Satisfied Clients
Puffer Finance has been a trusted partner for many satisfied clients:
“Thanks to Puffer Finance, I have not only grown my wealth but gained confidence in my financial future.” – Alex T.
“The tailored advice and financial strategies have truly transformed my investment approach.” – Samantha L.
In conclusion, if your goal is to enhance and secure your financial estate, Puffer Finance provides the tools and expertise to guide you through a prosperous journey.
my blog … PokerTube
deneme bonusu veren siteler deneme bonusu veren yeni siteler denemebonusuverensiteler25
Unveiling the Potential of Kelp DAO
In today’s rapidly evolving digital economy, Kelp DAO emerges as a transformative force in the field of decentralized finance (DeFi). By leveraging blockchain technology, Kelp DAO aims to improve governance and promote sustainability.
What is Kelp DAO?
Kelp DAO is a decentralized autonomous organization (DAO) designed to democratize decision-making processes on the blockchain. It serves as a pivotal tool for communities seeking enhanced and a focus on eco-friendly initiatives.
Why Choose Kelp DAO?
Here are several compelling reasons to consider Kelp DAO for your blockchain ventures:
Environmental Sustainability: Kelp DAO incorporates mechanisms that align with environmental conservation goals, making it an eco-conscious choice.
Decentralized Governance: With a robust framework for community-driven governance, participants can actively influence project directions.
Innovation in DeFi: By fostering an environment of innovation, Kelp DAO contributes to the evolving landscape of decentralized finance.
How Does Kelp DAO Work?
Kelp DAO operates through a token-based voting system, where community members hold the power to vote on proposals and influence project decisions. The DAO’s infrastructure ensures transparency and inclusivity, empowering stakeholders.
Getting Involved with Kelp DAO
Joining Kelp DAO is a straightforward process. Interested parties can engage by acquiring Kelp tokens, participating in community discussions, and voting on platform proposals. This involvement not only offers strategic governance participation but also contributes to the broader aim of sustainable development in the digital realm.
The Future of Kelp DAO
The ultimate vision for Kelp DAO is a fully decentralized platform where members collaboratively address global challenges while advancing decentralized financial mechanisms. As the community grows, so does its capacity to influence .
Join Kelp DAO today and become part of a pioneering movement towards a sustainable and decentralized financial future.
slot siteleri slot oyunlar? puf noktalar? guvenilir slot siteleri
https://casinositeleri25.com/# casino bahis siteleri
Renzo Protocol: Secure Blockchain Innovation
Discover the Renzo Protocol: Revolutionizing Blockchain
The Renzo Protocol represents a significant advancement in the blockchain technology landscape. It offers a secure and efficient platform for decentralized applications, setting a new standard in the industry.
renzo token
Key Features of the Renzo Protocol
The Renzo Protocol is designed to enhance the functionality and security of blockchain applications. Here are some of its key features:
High Security: Utilizing advanced encryption methods to protect user data and transactions.
Scalability: Capable of handling a large number of transactions per second, making it ideal for various applications.
Decentralization: Ensures that no central authority controls the network, maintaining the core principles of blockchain.
Interoperability: Seamlessly connects with other blockchain networks and systems.
Benefits for Developers and Businesses
The Renzo Protocol offers numerous benefits for both developers and businesses looking to leverage blockchain technology:
Reduced Costs: By automating processes and cutting out intermediaries, businesses can significantly reduce operational costs.
Improved Transparency: Every transaction is recorded on the blockchain, providing an immutable and transparent ledger.
Enhanced Trust: The secure nature of the protocol builds trust among users and stakeholders.
Development Support: Provides extensive documentation and tools to help developers create robust applications.
Getting Started with the Renzo Protocol
To start utilizing the Renzo Protocol, follow these simple steps:
Visit the Renzo Protocol website and create an account.
Access the API documentation and development tools.
Join the Renzo community to connect with other developers and experts.
Start building and deploying your decentralized applications.
The Renzo Protocol is not only a beacon of security and efficiency in the blockchain space but also a catalyst for innovation. Whether you are a developer, a business leader, or simply interested in cutting-edge technology, the Renzo Protocol offers the tools and community support needed to drive your projects to success. Embrace the future with the Renzo Protocol and harness the full potential of blockchain technology.
Renzo Protocol Restaking Guide
Renzo Protocol Restaking: A Comprehensive Guide
Renzo Protocol has revolutionized the method through which investors can maximize their crypto assets, particularly through the innovative concept of restaking. This guide will explore the benefits, processes, and strategies of restaking within the Renzo Protocol ecosystem, helping you make the most out of your investments.
Welcome to Karak: Pioneering Blockchain Solutions
The world of blockchain is evolving rapidly, and Karak is at the forefront of this revolution. Whether you are a developer, an investor, or merely a tech enthusiast, Karak offers a unique blend of innovative solutions designed to meet the diverse needs of the blockchain community.
karak network
What is Karak?
is a sophisticated blockchain platform engineered to provide cutting-edge solutions that streamline processes and enhance efficiency. With a focus on decentralization, security, and speed, Karak integrates seamlessly with existing technologies to deliver a scalable blockchain experience.
Key Features of Karak
One of the standout aspects of Karak is its comprehensive suite of features aimed at solving complex blockchain issues.
Scalability: Karak’s architecture is designed to handle a high volume of transactions without compromising performance.
Security: Robust security protocols ensure the integrity and confidentiality of data across all network points.
Interoperability: Seamlessly integrates with various blockchain networks, fostering collaboration and innovation.
User-Friendly Interface: Intuitive design that caters to both professionals and novices in the blockchain space.
Why Choose Karak?
Choosing Karak is choosing a future-proof solution. Its dedicated team of developers and blockchain experts continually work to enhance the platform, ensuring it meets the present and future demands of its users.
The benefits of using Karak include:
Access to a rapidly growing ecosystem that supports a vast array of applications.
A commitment to transparency and community-driven development.
Dynamic support systems that help users navigate and maximize platform capabilities.
Get Started with Karak
Jump into the world of digital transformation with Karak today. Visit to explore the platform and stay ahead in the dynamic blockchain landscape.
For more information, updates, and support, sign up for the Karak newsletter and become a part of the innovation that is reshaping the future of blockchain.
Welcome to EtherFi: Revolutionizing Financial Transactions
In the dynamic world of digital finance, EtherFi stands out as a revolutionary platform designed to reshape how you manage transactions and investments. Understanding this cutting-edge platform can provide you with the tools necessary for financial success in the digital age.
ether fi
What is EtherFi?
EtherFi is a robust platform built on advanced blockchain technology, offering secure, efficient, and transparent financial solutions. It leverages the power of Ethereum to facilitate various transactions, ensuring that users have access to a decentralized and trustworthy financial ecosystem.
Key Features of EtherFi
Decentralized Finance (DeFi): Enjoy the benefits of financial services without the need for traditional banking institutions.
Fast and Secure Transactions: Built on the Ethereum blockchain, EtherFi ensures that your transactions are both rapid and secure.
Low Transaction Fees: Reduce costs associated with financial transactions compared to traditional methods.
User-Friendly Interface: Whether you’re a seasoned investor or a newcomer, EtherFi’s platform is designed for ease of use.
Investment Opportunities with EtherFi
EtherFi offers a range of opportunities for investors looking to diversify their portfolios with blockchain assets. By utilizing smart contracts and decentralized applications, investors can securely manage and grow their digital assets with minimal risk.
Why Choose EtherFi?
As the world moves towards digital transformation, choosing a platform that can keep up with technological advancements is crucial. EtherFi not only provides an innovative approach to financial management but also ensures top-tier security, making it a preferred choice for digital finance enthusiasts.
Getting Started with EtherFi
Sign Up: Create an account on the EtherFi platform to begin your journey in digital finance.
Link Your Wallet: Connect your Ethereum wallet to start transacting seamlessly.
Explore Features: Navigate through the array of features available to optimize your investment strategies.
Invest & Transact: Utilize the platform to make informed investment decisions and complete secure transactions.
Overall, EtherFi offers a comprehensive and secure solution for anyone looking to embrace the future of finance. By integrating blockchain technology with everyday financial activities, users can enjoy unparalleled efficiency and effectiveness in their transactions and investments. Start your financial revolution with EtherFi today!
https://casinositeleri25.com/# en guvenilir casino siteleri
Understanding Venus Protocol: Your Gateway to DeFi
Venus Protocol has carved a niche in the fast-paced DeFi landscape by offering a one-stop solution for decentralized finance activities. Whether you’re interested in lending, borrowing, or yield farming, Venus provides secure and scalable services on the blockchain.
venus defi
Why Choose Venus Protocol?
The Venus Protocol stands out because:
It operates on the Binance Smart Chain, ensuring fast and cost-effective transactions.
It offers a decentralized lending platform that allows users to earn interest by supplying assets.
The protocol enables borrowing against crypto collateral without the need for a trusted counterparty.
It supports a wide range of crypto assets, providing higher liquidity and flexibility.
Key Features of Venus Protocol
Lending and Borrowing
Venus Protocol facilitates decentralized lending and borrowing with minimal fees, supported by a robust risk management framework. Users can seamlessly supply assets to the protocol and earn interest, or borrow by simply collateralizing their holdings.
Automated Yield Farming
Maximize your returns with Venus Protocol’s yield farming opportunities. By leveraging your assets, you can participate in governance and earn rewards in the form of XVS, Venus Protocol’s native token.
Multi-Asset Support
The platform supports numerous cryptocurrencies, enabling diverse investment strategies and providing a convenient way to gain returns on multiple asset classes.
Getting Started with Venus Protocol
Start your DeFi journey with Venus Protocol by following these steps:
Create a Wallet: Use a compatible wallet like Metamask or Trust Wallet to interface with Venus.
Fund Your Wallet: Transfer crypto assets to your wallet to engage with the Venus Protocol.
Connect and Start Earning: Connect your wallet to the Venus platform and start supplying or borrowing assets.
Venus Protocol is your trusted partner in the decentralized financial ecosystem. With its advanced features and strong community support, it simplifies DeFi for everyone from beginners to seasoned users. Embrace the future of finance with confidence and start exploring the possibilities at .
Welcome to Orbiter: Your Gateway to Financial Innovation
In the ever-evolving landscape of finance, Orbiter stands out as a pioneering platform dedicated to providing cutting-edge solutions for modern investors. As we navigate the future of digital assets and decentralized finance, Orbiter remains at the forefront, committed to innovation and accessibility.
orbiter bridge
Why Choose Orbiter?
Orbiter offers unique advantages that set it apart in the financial world:
Decentralized Solutions: Benefit from a trustless environment where transactions are secure and transparent.
Innovative Technologies: Leverage groundbreaking technologies, designed to maximize efficiency and utility.
Community Driven: Engage with a global community that supports and uplifts each other in the financial journey.
Key Features of Orbiter
Orbiter’s platform is rich with features tailored to both new and experienced investors.
1. Smart Investments
Utilize intelligent tools that enable you to optimize your investment strategies. Orbiter’s algorithms are crafted to pinpoint opportunities in both volatile and stable markets.
2. Secure Transactions
Enjoy peace of mind with Orbiter’s advanced security measures. Our platform ensures that each transaction is protected through top-tier encryption and blockchain technology.
3. User-Friendly Interface
Navigate with ease! Our user-friendly design ensures accessibility for everyone, from beginners to seasoned traders.
Join the Orbiter Community
By joining Orbiter, you’re becoming part of a larger movement towards decentralized and democratized finance. Share insights, learn from peers, and grow your financial acumen in the company of like-minded individuals.
Ready to explore the future of finance? Let Orbiter guide your journey towards smarter, more secure, and lucrative investments. Join us today and revolutionize how you approach financial management.
sweet bonanza guncel sweet bonanza kazanma saatleri sweet bonanza yorumlar