diff --git a/New_APIs/Adobe Photoshop API/Readme.md b/New_APIs/Adobe Photoshop API/Readme.md new file mode 100644 index 0000000..f7ce8c3 --- /dev/null +++ b/New_APIs/Adobe Photoshop API/Readme.md @@ -0,0 +1,29 @@ +# 🎨 Adobe Photoshop API + +## Overview + +The **Adobe Photoshop API** allows developers to integrate powerful image editing capabilities into their applications. This API enables users to perform advanced image manipulations, automate repetitive tasks, and enhance images programmatically, leveraging the full power of Adobe Photoshop. + +## Features + +- **Image Editing**: Access advanced image editing tools and features, such as layers, filters, and effects. +- **Automation**: Automate complex and repetitive image processing tasks, saving time and improving efficiency. +- **Creative Effects**: Apply creative effects to images, such as blur, sharpen, and color correction. +- **File Management**: Handle various image file formats, including PSD, JPEG, PNG, and more. + +## Getting Started + +### Prerequisites + +- **API Key**: You will need an API key to access the Adobe Photoshop API. You can request an API key by [signing up](#) on our website. + +### Installation + +To use the Adobe Photoshop API, you can install it via npm (if you are building a Node.js application): + +```bash +npm install adobe-photoshop-api +``` + +## Contributor +### Sree Vidya diff --git a/New_APIs/Adobe Photoshop API/index.html b/New_APIs/Adobe Photoshop API/index.html new file mode 100644 index 0000000..5855987 --- /dev/null +++ b/New_APIs/Adobe Photoshop API/index.html @@ -0,0 +1,26 @@ + + + + + + + Adobe Photoshop API Demo + + +
+

Adobe Photoshop API

+
+
+
+

Upload an Image

+ + +
+
+

Processed Image

+ Processed Image +
+
+ + + diff --git a/New_APIs/Adobe Photoshop API/index.js b/New_APIs/Adobe Photoshop API/index.js new file mode 100644 index 0000000..8c2bd47 --- /dev/null +++ b/New_APIs/Adobe Photoshop API/index.js @@ -0,0 +1,36 @@ +document.getElementById('applyEffectButton').addEventListener('click', applyEffect); + +const apiKey = 'YOUR_ADOBE_API_KEY'; // Replace with your Adobe Photoshop API key + +async function applyEffect() { + const imageUpload = document.getElementById('imageUpload').files[0]; + + if (!imageUpload) { + alert('Please upload an image.'); + return; + } + + const formData = new FormData(); + formData.append('image', imageUpload); + + try { + const response = await fetch('https://image.adobe.io/pie/psdService/photoshop?job=simple-filter-job', { + method: 'POST', + headers: { + 'Authorization': `Bearer ${apiKey}`, + 'x-api-key': apiKey + }, + body: formData + }); + + if (response.ok) { + const result = await response.json(); + document.getElementById('resultImage').src = result.output.imageUrl; // Assuming the API returns the processed image URL + } else { + alert('Failed to process the image.'); + } + } catch (error) { + console.error('Error:', error); + alert('Error processing the image.'); + } +} diff --git a/New_APIs/Adobe Photoshop API/package-lock.json b/New_APIs/Adobe Photoshop API/package-lock.json new file mode 100644 index 0000000..ff380a7 --- /dev/null +++ b/New_APIs/Adobe Photoshop API/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "adobe-photoshop-api-demo", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-G7fYv8zS0D7ftu3gnLsOniwhgLU4k9v+1NEtFPP07/Oa8XJ51FtdUKLqIvsTcZo5ua23NO4s9Hr77BM19DOf1g==" + } + } +} diff --git a/New_APIs/Adobe Photoshop API/package.json b/New_APIs/Adobe Photoshop API/package.json new file mode 100644 index 0000000..fd7ed88 --- /dev/null +++ b/New_APIs/Adobe Photoshop API/package.json @@ -0,0 +1,15 @@ +{ + "name": "adobe-photoshop-api-demo", + "version": "1.0.0", + "description": "A simple app to demonstrate the Adobe Photoshop API", + "main": "server.js", + "scripts": { + "start": "node server.js" + }, + "author": "Your Name", + "license": "ISC", + "dependencies": { + "adobe-photoshop-api-demo": "file:", + "express": "^4.17.1" + } +} diff --git a/New_APIs/Adobe Photoshop API/server.js b/New_APIs/Adobe Photoshop API/server.js new file mode 100644 index 0000000..74380f6 --- /dev/null +++ b/New_APIs/Adobe Photoshop API/server.js @@ -0,0 +1,8 @@ +const express = require('express'); +const app = express(); + +app.use(express.static('public')); + +app.listen(3000, () => { + console.log('Server is running on port 3000'); +}); diff --git a/New_APIs/Adobe Photoshop API/style.css b/New_APIs/Adobe Photoshop API/style.css new file mode 100644 index 0000000..97c9c5a --- /dev/null +++ b/New_APIs/Adobe Photoshop API/style.css @@ -0,0 +1,71 @@ +body { + font-family: 'Arial', sans-serif; + background: linear-gradient(135deg, #6a11cb, #de3434); + color: #fff; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100vh; + margin: 0; +} + +header { + text-align: center; + margin-bottom: 20px; +} + +header h1 { + font-size: 3em; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); +} + +main { + width: 90%; + max-width: 600px; + background: rgba(255, 255, 255, 0.1); + border-radius: 10px; + padding: 20px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); +} + +.upload-section, +.result-section { + margin-bottom: 20px; + text-align: center; +} + +input[type="file"] { + display: block; + margin: 0 auto 15px auto; + font-size: 1em; + border: none; + border-radius: 5px; + outline: none; + padding: 10px; + width: 80%; + max-width: 400px; +} + +button { + padding: 10px 20px; + font-size: 1em; + background-color: #444; + color: #fff; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s; +} + +button:hover { + background-color: #666; +} + +.result-section img { + width: 100%; + max-width: 500px; + border-radius: 10px; + margin-top: 15px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); +}