Introduction
Adobe Photoshop remains the go-to tool for photo editing and graphic design in 2026, used by 90% of industry professionals. Whether you're an amateur photographer, beginner designer, or marketer, mastering Photoshop lets you retouch images, create eye-catching visuals, and automate repetitive tasks. This beginner tutorial guides you step by step: from exploring the interface to your first ExtendScript (JavaScript for Photoshop) scripts, plus essential tools like the brush and layers. Imagine turning a blurry photo into a pro masterpiece in 30 minutes—that's the goal. With concrete examples and copy-paste code, you'll be up and running quickly. No fluff: every step is actionable for immediate results.
Prerequisites
- Adobe Photoshop 2026 (or recent version via Creative Cloud)
- A computer with at least 8 GB RAM (16 GB recommended for smooth performance)
- Basic computer skills (copy-paste, navigation)
- No programming knowledge required: scripts are explained line by line
Step 1: Explore the Interface
Launch Photoshop. The interface is divided into the toolbar (left, icons like the rectangular selection), panels (right: layers, properties), and central workspace (canvas). Activate the Essentials workspace via Window > Workspaces. Create a new document: File > New (1920x1080 px, RGB). Think of it like a blank canvas with a toolbox at your fingertips. Navigate with Ctrl/Cmd + 0 to zoom to fit.
Script 1: Create a New Document
#target photoshop
// Create a new 800x600 px document with white background
app.documents.add(800, 600, 72, "My First Document", NewDocumentMode.RGB, DocumentFill.WHITE);
// Add a text layer
var textLayer = app.activeDocument.artLayers.add();
textLayer.kind = LayerKind.TEXT;
textLayer.textItem.contents = "Hello Photoshop!";
textLayer.textItem.position = [100, 100];
textLayer.textItem.size = 48;
app.activeDocument.save();This ExtendScript creates an 800x600 px document with a white background, adds a 'Hello Photoshop!' text layer positioned and sized. Run it via File > Scripts > Browse. It automates initial setup, skipping manual clicks. Pitfall: Ensure Photoshop is open; otherwise, 'app undefined' error.
Step 2: Master Layers
Layers are at the heart of Photoshop: like stacked transparencies. In the Layers panel (right), duplicate a layer with Ctrl/Cmd + J. Mask one using the mask icon (rectangle with circle). Set opacity to 50% for blending. Real-world example: import an image (File > Place Embedded), duplicate it, apply Filter > Blur > Gaussian Blur to the copy for a pro effect.
Script 2: Duplicate and Mask a Layer
#target photoshop
if (app.documents.length > 0) {
var doc = app.activeDocument;
var originalLayer = doc.activeLayer;
// Duplicate the active layer
var dupLayer = originalLayer.duplicate();
dupLayer.name = "Masked Copy";
// Add an empty layer mask
var mask = dupLayer.createLayerMask();
// Fill the mask with black (invisible)
mask.apply("Fill", [0, 0, 0], 100);
app.activeDocument.save();
}This script duplicates the active layer, renames it, adds an empty mask, and fills it black to hide it. Perfect for non-destructive effects. Ensure a document is open. Pitfall: No layer selected causes an error; select one first.
Step 3: Selection and Editing Tools
Grab the Brush Tool (B) to paint, Type Tool (T) for text. Gradient Tool (G) for pro backgrounds. Example: Create an elliptical selection (Elliptical Marquee Tool), fill with blue (Edit > Fill). Undo with Ctrl/Cmd + Z. Tip: Ctrl/Cmd + D to deselect.
Script 3: Add an Automatic Gradient
#target photoshop
if (app.documents.length > 0) {
var doc = app.activeDocument;
// Create a new layer
var gradientLayer = doc.artLayers.add();
gradientLayer.name = "Background Gradient";
// Select entire canvas
doc.selection.selectAll();
// Apply linear blue-to-purple gradient
var desc = new ActionDescriptor();
desc.putEnumerated(charIDToTypeID("Grad"), charIDToTypeID("Grad"), charIDToTypeID("Lnr "));
desc.putUnitDouble(charIDToTypeID("Opct"), charIDToTypeID("#Prc"), 100);
executeAction(charIDToTypeID("Gd "), desc);
doc.selection.deselect();
doc.activeLayer = gradientLayer;
app.activeDocument.save();
}This script adds a layer, selects all, and applies a linear blue-to-purple gradient using Action Manager (advanced API). Result: instant stylish background. Pitfall: Needs an open document; default gradients must exist.
Script 4: Resize the Image
#target photoshop
if (app.documents.length > 0) {
var doc = app.activeDocument;
// Resize to 1200px width, proportional
doc.resizeImage(1200, undefined, 72, ResampleMethod.BICUBICSHARPER);
// Optimize for web (sRGB)
doc.changeMode(ChangeMode.RGB);
// Save as JPEG
var jpgOptions = new JPEGSaveOptions();
jpgOptions.embedColorProfile = true;
jpgOptions.formatOptions = FormatOptions.STANDARDBASELINE;
jpgOptions.matte = MatteType.NONE;
jpgOptions.quality = 12;
doc.saveAs(new File(doc.path + "/optimized.jpg"), jpgOptions);
}Resizes the active image to 1200px wide (proportions preserved), converts to RGB, and exports optimized JPEG. Ideal for web. Pitfall: 'undefined' height keeps proportions; test on duplicates to avoid data loss.
Step 4: First Adjustments
Image > Adjustments > Curves to fix exposure (drag curve up to brighten). Levels for contrast. Example: Open a dark photo, apply Filter > Render > Clouds for texture.
Script 5: Auto-Adjust Levels
#target photoshop
if (app.documents.length > 0) {
var doc = app.activeDocument;
// Select all layers
doc.activeLayer = doc.layers[0];
// Auto Levels (like Ctrl/Cmd + Shift + L)
var idLvls = charIDToTypeID("Lvls");
var desc1 = new ActionDescriptor();
var idDplc = charIDToTypeID("Dplc");
desc1.putBoolean(idDplc, false);
executeAction(idLvls, desc1, DialogModes.NO);
app.activeDocument.save();
}Applies auto levels to the background layer (automatic contrast/exposure). Matches the keyboard shortcut. Pitfall: Targets first layer; select the right one for multi-layer docs.
Script 6: Export Transparent PNG
#target photoshop
if (app.documents.length > 0) {
var doc = app.activeDocument;
// Make background transparent if present
if (doc.layers[doc.layers.length - 1].isBackgroundLayer) {
doc.layers[doc.layers.length - 1].isBackgroundLayer = false;
}
// PNG options
pngFileOptions = new PNGSaveOptions();
pngFileOptions.compression = 0;
pngFileOptions.interlaced = false;
// Save
var pngFile = new File(doc.path + "/export-transparent.png");
doc.saveAs(pngFile, pngFileOptions);
alert("Exported: " + pngFile.name);
}Converts background to regular layer if needed, exports transparent PNG (great for logos). Minimal compression for quality. Pitfall: Folder must exist; use full path otherwise.
Best Practices
- Always work non-destructively: Use masks and adjustment layers (Layer > New Adjustment Layer).
- Save as PSD to keep layers, export final PNG/JPG.
- Keyboard shortcuts: B (brush), V (move), Ctrl/Cmd + T (free transform).
- Scripts: Store in Photoshop > Scripts for quick menu access.
- Workspace: Customize via Window > Workspace > New for efficiency.
Common Mistakes to Avoid
- Flatten too early: Keep layers separate for edits; use History Brush for fixes.
- Ignore resolution: 72 DPI for web, 300 DPI for print—check in Image Properties.
- Run scripts untested: Use duplicates (Image > Duplicate).
- Low memory: Close other apps; enable Edit > GPU Memory in Preferences.
Next Steps
Master advanced masks, actions (record macros), and 2026's integrated Firefly AI. Check our Learni graphic design courses. Resources: Adobe Scripting Docs, Photoshop Cafe Tutorials.