Photoshop tips and how-tos incl image slicing for Web and using sprites

I had some great how-tos on Photoshop and lost them :-( So here's the rebuild.

Tool Pallet
Slice tool: on pallet is one of 3 of crop, slide and slide select 
Move tool: dashed box in pallet, then draw round the item, then click and hold mouse and drag the item
Line tool: 8th from bottom, used to draw lines


Layers
- you can temporarily turn off every other layer in the Layers palette except for that one layer by holding down your Alt (Win) / Option (Mac) key and clicking on the Layer Visibility icon. To turn all the layers back on again, hold down Alt (Win) / Option (Mac) and click again on the same Layer Visibility icon. More


Slice for web
Useful links on how to here and here

Clear Slices: View -> Clear Slices (when slice tool is selected from pallet)


Pixel Perfect to the PSD
To compare your work to the PSD image do the following
- Open Mac Grab tool (Cmd - Space)
- Choose window button and then click the window to grab
- when it appears in grab tool, copy it (Cmd - C)
- then paste into Photshop page (which has the psd image loaded)
- in layer view, click top drop down and choose Multiply. Now you should see both views
- Use move tool (arrow and plus) to move your pasted image to line up with original (use arrow keys to move last few pixels)
- then measure diffs and fix in your css
- ...and repeat




Sprites
Cutting for sprite
Note: when create new PSD be sure to select transparent and be sure to allow space between images.

Yahoo and AOL analysis
CSS simple sprites css article
Multiple links

Building a Sprite and css manually

  1. Using Slice tool (see top) I sliced the assets in Photoshop and pasted into a new PSD. 
  2. I created new PSD with transparent background and enough space for the images and padding and then some extra space. We can slice the png from the psd to a smaller size at save time.
  3. I used Edit -> Copy to copy across from source to target psd. 
  4. tip: use View -> Clear Slices to clear slices
  5. tip: to select the image sprint in the target psd then click the layer on the right side, then can move with arrow keys
  6. I created next and prev arrows horizontal starting with prev button image on left.
  7. I defined next and prev css classes as follows:
  8. next class with the image url, no repeat and x of -39px, y of 0px. Width and height 36 and 38px
  9. prev class with the image url, no repeat and x of 0px, y of 0px. Width and height 36 and 38px
  10. then apply in the html

Comments

Popular posts from this blog

My Reading Lists

angular js protractor e2e cheatsheet

react-select stacking order bug, z-index, layers and stacking