public marks

PUBLIC MARKS from sbrothier with tags css & photoshop

2014

Avocode – Preview and inspect PSDs

Get CSS, SVG, image assets, fonts, colors. All without Photoshop.

2013

richardjdare.com » Blog Archive » AtlasMaker 0.7 – Make Texture Atlases in Photoshop

In game development it is common to have hundreds if not thousands of texture maps and animation frames in a single project. Keeping track of all these images is taxing for both the developer and the computer, so what we do is arrange the images into texture atlases.

A M | CSS Sprites

(via)
Someone at work came to me asking if there was a clever way to create sprites, to help the markup guy finding the coordinates of all the images in a large sprite. And everytime the designer was updating the sprite he had to verify if all the images were still in place. So I asked Ivan Montes if he could help me out creating a script to allocate image positions His answer was better than expected: "I've already done that, and there´s a guy who took my script to create a Photoshop plugin".

2012

Phrogz/context-blender · GitHub

by 1 other (via)
Syntax overContext.blendOnto( underContext, blendMode, offsetOptions ); - overContext : A CanvasRenderingContext2D - underContext : A CanvasRenderingContext2D - blendMode : A string with the blend mode to use, e.g. 'screen' - offsetOptions : [optional] JS Object with some/all of the following keys: destX, destY The X/Y location in the 'underContext' to blend onto; both default to 0. sourceX, sourceY The X/Y location in the 'overContext' to blend from; both default to 0. width,height The size of the box to blend; both default to 'auto', blending up to the right and bottom edges of the 'over' context. Width and height may less than specified if there is not enough space on the over or under contexts to fit the blend. Use // Likely an 'offscreen' (not in the DOM) canvas var over = someCanvas.getContext('2d'); // Usually a canvas that is shown on the page var under = anotherCanvas.getContext('2d'); // Blend all of 'over' onto 'under', starting at the upper left corner over.blendOnto(under,'screen'); // Blend all of 'over' onto 'under' (again), starting at 17,42 in 'under' over.blendOnto(under,'multiply',{destX:17,destY:42}); // Blend a 16x16 tile from 'over' onto 'under' (again), starting at 17,42 in 'under' over.blendOnto(under,'add',{destX:17,destY:42,sourceX:32,sourceY:128,width:16,height:16}); Supported Blend Modes The following blend modes work perfectly (or as nearly as the vagaries of the HTML Canvas allow): normal (or src-over) screen multiply difference These blend modes mostly work as intended, but have issues when it comes to dealing with the alpha channel: exclusion - very subtle color differences (slightly too bright) under limited circumstances. src-in - the output of this blend mode is slightly different from the effect of applying the transparency of one layer as a mask to another; the difference only appears in low-opacity areas, however. add (or plus) - Photoshop's "Linear Dodge (add)" blend mode does not perform addition on the opacities of the two layers. I have not yet figured out what it does instead. For now, this mode performs simple numeric addition, the same as the SVG 1.2 "plus" mode. lighten (or lighter) - the result is slightly too dark when the opacity falls and incorrectly 'favors' a higher-opacity source. darken (or darker) - the result is too dark when combining low-opacity regions, and does not properly 'favor' the higher-opacity source. overlay - this is only correct where both the over and under images are 100% opaque; the lower the alpha of either/both images, the more the colors get clamped, resulting in high contrast. hardlight - this is the opposite of "overlay" and experiences similar problems when either image is not fully opaque. colordodge (or dodge) - works correctly only under 100% opacity colorburn (or burn) - works correctly only under 100% opacity Requirements/Browser Support Tested on Safari v5.0, Chrome v8, and FF v3.6. Should work on any user agent that supplies a CanvasRenderingContext2D along with getImageData and putImageData. About This library was created around the need solely for a one-off 'screen' blend mode to match the company-mandated style for bar graphs used internally, previously only available via a Microsoft® Excel® template. Clearly this functionality is useful in more contexts than just my one-off, so I decided to make a framework around it and encourage others to help figure out the formulae. Please, fork this project, add blend modes and/or fix math, and send me pull requests! I feel certain that the resources must exist out there on the equations Photoshop uses in the presence of alpha, but so far I have not found them. Reference Material PDF Blend Modes: Addendum (January 23, 2006) PDF SVG Compositing 1.2, Part 1: Primer Custom blend modes for Flash 10 blog post Blend Modes in Delphi blog post License This library is released under an MIT-style license. That generally means that you are free to do almost anything you want with it as long as you give a bit of credit where credit is due. See the LICENSE file included for the actual legal limitations.

Bringing blending to the Web | Web Platform Team Blog

If you’re a user of our design applications such as Photoshop and Illustrator, you know how you can create very cool effects with blend modes. An Amazon search returns many books and a Google search on ‘photoshop blending tutorial’ returns more than 200,000 results. This points to a very widely known and used feature.

2010

John Nack on Adobe : Feedback, please: HTML5 layers in Photoshop?

What if Photoshop implemented native HTML as a layer type? Just like the app currently supports special layer types for text, 3D, and video, it could use the WebKit engine (which CS5 already embeds) to display HTML content. Among other things you’d get pixel-accurate Web rendering (text and shapes); the ability to style objects via CSS parameters (enabling effects like dotted lines); data-driven 2D and 3D graphics; and high fidelity Web output (HTML as HTML).