透過網頁讀取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://mexicanpharma.icu/# pharmacies in mexico that ship to usa
проститутки проверенные москва проститутки проверенные москва .
Профессиональный сервисный центр по ремонту МФУ в Москве.
Мы предлагаем: где починить мфу в москве
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Профессиональный сервисный центр по ремонту МФУ в Москве.
Мы предлагаем: ремонт мфу цены
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Sea robins are fish with ‘the wings of a bird and multiple legs like a crab’
kra8 cc
Some types of sea robins, a peculiar bottom-dwelling ocean fish, use taste bud-covered legs to sense and dig up prey along the seafloor, according to new research.
Sea robins are so adept at rooting out prey as they walk along the ocean floor on their six leglike appendages that other fish follow them around in the hope of snagging some freshly uncovered prey themselves, said the authors of two new studies published Thursday in the journal Current Biology.
David Kingsley, coauthor of both studies, first came across the fish in the summer of 2016 after giving a seminar at the Marine Biological Laboratory in Woods Hole, Massachusetts. Kingsley is the Rudy J. and Daphne Donohue Munzer Professor in the department of developmental biology at Stanford University’s School of Medicine.
Before leaving to catch a flight, Kingsley stopped at a small public aquarium, where he spied sea robins and their delicate fins, which resemble the feathery wings of a bird, as well as leglike appendages.
“The sea robins on display completely spun my head around because they had the body of a fish, the wings of a bird, and multiple legs like a crab,” Kingsley said in an email.
“I’d never seen a fish that looked like it was made of body parts from many different types of animals.”
Kingsley and his colleagues decided to study sea robins in a lab setting, uncovering a wealth of surprises, including the differences between sea robin species and the genetics responsible for their unusual traits, such as leglike fins that have evolved so that they largely function as sensory organs.
The findings of the study team’s new research show how evolution leads to complex adaptations in specific environments, such as the ability of sea robins to be able to “taste” prey using their quickly scurrying and highly sensitive appendages.
7 simple secrets to eating the Mediterranean way
kra cc
What if “diet” wasn’t a dirty word?
During Suzy Karadsheh’s childhood in Port Said, Egypt, diet culture was nonexistent.
“My parents emphasized joy at the table, rather than anything else,” Karadsheh said. “I grew up with Mediterranean lifestyle principles that celebrate eating with the seasons, eating mostly whole foods and above all else, sharing.”
But when Karadsheh moved to the United States at age 16, she witnessed people doing detoxes or restricting certain food groups or ingredients. Surrounded by that narrative and an abundance of new foods in her college dining hall, she says she “gained the freshman 31 instead of the freshman 15.” When she returned home to Egypt that summer, “I eased back into eating the Mediterranean food that I grew up with. During the span of about two months, I shed all of that weight without thinking I was ever on a diet.”
To help invite joy back to the table for others — and to keep her family’s culinary heritage alive for her two daughters (now 14 and 22) — Atlanta-based Karadsheh launched The Mediterranean Dish food blog 10 years ago. Quickly, her table started getting filled with more than just her friends and family.
“I started receiving emails from folks whose doctors had prescribed the Mediterranean diet and were seeking approachable recipes,” Karadsheh said. The plant-based eating lifestyle, often rated the world’s best diet, can reduce the risk for diabetes, high cholesterol, dementia, memory loss and depression, according to research. What’s more, the meal plan has been linked to stronger bones, a healthier heart and longer life.
Preparing meals the Mediterranean way, according to Karadsheh, can help you “eat well and live joyfully. To us, ‘diet’ doesn’t mean a list of ‘eat this’ and ‘don’t eat that.’” Instead of omission, Karadsheh focuses on abundance, asking herself, “what can I add to my life through this way of living? More whole foods, vegetables, grains, legumes? Naturally, when you add these good-for-you ingredients, you eat less of what’s not as health-promoting,” she told CNN.
Профессиональный сервисный центр по ремонту МФУ в Москве.
Мы предлагаем: ремонт мфу с гарантией
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
вызвать проституток https://www.prime-girls.ru .
7 simple secrets to eating the Mediterranean way
kraken войти
What if “diet” wasn’t a dirty word?
During Suzy Karadsheh’s childhood in Port Said, Egypt, diet culture was nonexistent.
“My parents emphasized joy at the table, rather than anything else,” Karadsheh said. “I grew up with Mediterranean lifestyle principles that celebrate eating with the seasons, eating mostly whole foods and above all else, sharing.”
But when Karadsheh moved to the United States at age 16, she witnessed people doing detoxes or restricting certain food groups or ingredients. Surrounded by that narrative and an abundance of new foods in her college dining hall, she says she “gained the freshman 31 instead of the freshman 15.” When she returned home to Egypt that summer, “I eased back into eating the Mediterranean food that I grew up with. During the span of about two months, I shed all of that weight without thinking I was ever on a diet.”
To help invite joy back to the table for others — and to keep her family’s culinary heritage alive for her two daughters (now 14 and 22) — Atlanta-based Karadsheh launched The Mediterranean Dish food blog 10 years ago. Quickly, her table started getting filled with more than just her friends and family.
“I started receiving emails from folks whose doctors had prescribed the Mediterranean diet and were seeking approachable recipes,” Karadsheh said. The plant-based eating lifestyle, often rated the world’s best diet, can reduce the risk for diabetes, high cholesterol, dementia, memory loss and depression, according to research. What’s more, the meal plan has been linked to stronger bones, a healthier heart and longer life.
Preparing meals the Mediterranean way, according to Karadsheh, can help you “eat well and live joyfully. To us, ‘diet’ doesn’t mean a list of ‘eat this’ and ‘don’t eat that.’” Instead of omission, Karadsheh focuses on abundance, asking herself, “what can I add to my life through this way of living? More whole foods, vegetables, grains, legumes? Naturally, when you add these good-for-you ingredients, you eat less of what’s not as health-promoting,” she told CNN.
Automatic takeoffs are coming for passenger jets and they’re going to redraw the map of the sky
kra10 cc
In late 1965, at what’s now London Heathrow airport, a commercial flight coming from Paris made history by being the first to land automatically.
The plane – A Trident 1C operated by BEA, which would later become British Airways – was equipped with a newly developed extension of the autopilot (a system to help guide the plane’s path without manual control) known as “autoland.”
Today, automatic landing systems are installed on most commercial aircraft and improve the safety of landings in difficult weather or poor visibility.
Now, nearly 60 years later, the world’s third largest aircraft manufacturer, Brazil’s Embraer, is introducing a similar technology, but for takeoffs.
Called “E2 Enhanced Take Off System,” after the family of aircraft it’s designed for, the technology would not only improve safety by reducing pilot workload, but it would also improve range and takeoff weight, allowing the planes that use it to travel farther, according to Embraer.
“The system is better than the pilots,” says Patrice London, principal performance engineer at Embraer, who has worked on the project for over a decade. ”That’s because it performs in the same way all the time. If you do 1,000 takeoffs, you will get 1,000 of exactly the same takeoff.”
Embraer, London adds, has already started flight testing, with the aim to get it approved by aviation authorities in 2025, before introducing it from select airports.
Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
Мы предлагаем:ремонт крупногабаритной техники в уфе
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Как поддерживать хорошее настроение с помощью смешных приколов
Automatic takeoffs are coming for passenger jets and they’re going to redraw the map of the sky
kra cc
In late 1965, at what’s now London Heathrow airport, a commercial flight coming from Paris made history by being the first to land automatically.
The plane – A Trident 1C operated by BEA, which would later become British Airways – was equipped with a newly developed extension of the autopilot (a system to help guide the plane’s path without manual control) known as “autoland.”
Today, automatic landing systems are installed on most commercial aircraft and improve the safety of landings in difficult weather or poor visibility.
Now, nearly 60 years later, the world’s third largest aircraft manufacturer, Brazil’s Embraer, is introducing a similar technology, but for takeoffs.
Called “E2 Enhanced Take Off System,” after the family of aircraft it’s designed for, the technology would not only improve safety by reducing pilot workload, but it would also improve range and takeoff weight, allowing the planes that use it to travel farther, according to Embraer.
“The system is better than the pilots,” says Patrice London, principal performance engineer at Embraer, who has worked on the project for over a decade. ”That’s because it performs in the same way all the time. If you do 1,000 takeoffs, you will get 1,000 of exactly the same takeoff.”
Embraer, London adds, has already started flight testing, with the aim to get it approved by aviation authorities in 2025, before introducing it from select airports.
Профессиональный сервисный центр по ремонту планшетов в том числе Apple iPad.
Мы предлагаем: айпад сервисный центр
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
You can now order your Spirit Halloween costume on Uber Eats
kraken тор браузер
Uber is cashing in on spooky season.
The ridehailing company will now deliver costumes, makeup, and even decorations from Spirit Halloween, the largest Halloween retailer in North America, Uber announced in a press release Friday.
Big-box retailers are getting into Halloween earlier and earlier, suggesting American consumers continue spending on the October holiday even as they pull back from other discretionary purchases.
Customers in the US and Canada can buy their Chipotle burrito costume for the same price as in store, but without having to visit the seasonal Halloween store that pops up in abandoned storefronts every year, Uber said. Of course, there will still be the fees associated with Uber Eats delivery.
Spirit Halloween has 1,525 locations.
“The holiday season officially kicks off this time of year, and households across the country are looking to on-demand delivery to get what’s needed—now,” said Beryl Sanders, director of US grocery and retail partnerships at Uber, in a statement.
Since the pandemic, different types of retailers have partnered with Uber to deliver their goods – such as Olive Garden for its breadsticks and pasta. Uber Eats has also partnered with Big Lots, Lowe’s, Michael’s and Party City for on-demand delivery.
Uber and its competitors have also experimented with robot deliveries, though those have not fully taken off in the US market.
замена шлейфа nissan tiida 2008 подробное руководство по замене подрулевого шлейфа s11
Профессиональный сервисный центр по ремонту МФУ в Москве.
Мы предлагаем: сервис по ремонту мфу
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!
Feel free to surf to my blog – play poker
Смешные анекдоты. Что такое анекдот.
Успейте воспользоваться промокодом для cryptoboss casino|Уникальный шанс с промокодом на cryptoboss casino
Бонусный код для cryptoboss casino|Используйте промокод в cryptoboss casino и увеличьте свои шансы на победу
Эксклюзивная акция для игроков cryptoboss casino|Уникальное предложение от cryptoboss casino с промокодом
Специальное предложение от cryptoboss casino с промокодом|cryptoboss casino – играйте со скидкой по промокоду
криптобосс промокод на увеличение выигрыша криптобосс промокод на увеличение кэшбэка .
Получите уникальный бонус с cryptoboss casino промокодом
Воспользуйтесь промокодом в cryptoboss casino для дополнительных выигрышей
Играйте в cryptoboss casino с дополнительными бонусами от промокодов|cryptoboss casino – преимущества промокодов
Успейте воспользоваться cryptoboss casino промокодом и выиграть больше|Получите дополнительные бонусы с cryptoboss casino промокодом|cryptoboss casino промокод – ваш путь к успеху|Уникальное предложение от cryptoboss casino с промокодом|Получите уникальные бонусы в cryptoboss casino по промокоду|cryptoboss casino – играйте с преимуществами промокода|Эксклюзивный cryptoboss casino промокод – ваш путь к победе|Уникальное предложение для игроков cryptoboss casino: промокод|Играйте в cryptoboss casino с преимуществом промокода|cryptoboss casino промокоды – ваш путь к успеху|Получите уникальные бонусы с cryptoboss casino промокодом|cryptoboss casino промокод – ваш ключ к победе|Бонусы и скидки с cryptoboss casino промокодом|Успейте активировать cryptoboss casino промокод для дополнительных выигрышей|Используйте cryptoboss casino промокод для увеличения шансов на победу|Уникальные предложения от cryptoboss casino с промокодом|Получите привилегии с cryptoboss casino промокодом|Играйте в cryptoboss casino с уникальным промокодом для успеха
Hi everyone, it’s my first go to see at this site, and piece of writing is actually fruitful for me, keep up posting these content.
люстры потолочные newport купить
Arrowheads reveal the presence of a mysterious army in Europe’s oldest battle
порно групповое жесток
Today, the lush, green valley surrounding the Tollense River in northeast Germany appears to be a serene place to appreciate nature.
But to archaeologists, the Tollense Valley is considered Europe’s oldest battlefield.
An amateur archaeologist first spotted a bone sticking out of the riverbank in 1996.
A series of ongoing site excavations since 2008 has shown that the thousands of bones and hundreds of weapons preserved by the valley’s undisturbed environment were part of a large-scale battle 3,250 years ago.
The biggest mysteries that researchers aim to uncover are why the battle occurred and who fought in it. These are questions that they are now one step closer to answering.
ozens of bronze and flint arrowheads recovered from the Tollense Valley are revealing details about the able-bodied warriors who fought in the Bronze Age battle.
The research team analyzed and compared the arrowheads, some of which were still embedded in the remains of the fallen. While many of these weapons were locally produced, some bearing different shapes came from a region that now includes modern Bavaria and Moravia.
The outliers’ presence suggests that a southern army clashed with local tribes in the valley, and researchers suspect the conflict began at a key landmark along the river.
Back to the future
Scientists are harnessing the power of artificial intelligence to detect hidden archaeological sites buried below the sand of the sprawling Rub‘ al-Khali desert.
The desert spans 250,000 square miles (650,000 square kilometers) on the Arabian Peninsula, and its name translates to “the Empty Quarter” in English. To unravel the secrets of the desolate terrain, researchers are combining machine learning with a satellite imagery technique that uses radio waves to spot objects that may be concealed beneath surfaces.
The technology will be tested in October when excavations assess whether predicted structures are present at the Saruq Al Hadid complex in Dubai, United Arab Emirates.
Separately, an AI-assisted analysis uncovered a trove of ancient symbols in Peru’s Nazca Desert, nearly doubling the number of known geoglyphs, or stone and gravel arranged into giant shapes that depict animals, humans and geometric designs.
https://kudago.com/all/news/ob-aktualnosti-sluzhb/
Как поднять настроение близким с помощью смешных приколов в интернете.
Hello! I’m at work browsing your blog from my new apple iphone! Just wanted to say I love reading your blog and look forward to all your posts! Carry on the superb work!
люстра кристалл люкс
Временная регистрация в Санкт-Петербурге: Быстро и Легально!
Ищете, где оформить временную регистрацию в СПб?
Мы гарантируем быстрое и легальное оформление без очередей и лишних документов.
Ваше спокойствие – наша забота!
Минимум усилий • Максимум удобства • Полная легальность
Свяжитесь с нами прямо сейчас!
Временная регистрация в СПб
Смешные анекдоты. История анекдотов.
Joycasinoは、プレイヤーにとって迅速な出金がいかに重要であるかを理解しています。そのため、オンラインカジノは出金プロセスを最大限に最適化しています。ほとんどのリクエストは数時間以内に処理され、VIPプレイヤーの場合、このプロセスはさらに速くなります。銀行カード、電子ウォレット、暗号通貨を含む幅広い決済方法から、最も便利な方法を選べます。ジョイカジノでは、長い間勝利を待つ必要はありません! ジョイ カジノ
Профессиональный сервисный центр по ремонту посудомоечных машин с выездом на дом в Москве.
Мы предлагаем: диагностика посудомоечной машины цена
Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!