A closer look at the Photoshop Generator syntax

- Joel Brandt and Samartha Vashishtha

The Photoshop Generator feature offers great flexibility in the ways you can rename layers/layer groups to specify size and quality parameters. Stepping beyond the recommendations in the Help article, this blog post looks at some valid variations that you can use while tagging layer/layer group names.

Before we begin, let’s look at the conventions followed in this blog post:

gradient_suffix-prefix

Space case

  • The filename portion of a layer/layer group name can include space characters. For example:
    250% Foo Bar Baz.gif
    Result: Generates a single file named Foo Bar Baz.gif scaled by 250%
  • While specifying absolute sizes, you can omit the space character between the height and the width. For example:
    100×80 foo.png
    Result: Generates a 100 px x 80 px-sized PNG file named foo.png
  • Do add a space character between the size parameter (prefix) and the layer name. For example:
    100×100 foo.png
  • You can omit the space character following the separator (, or +). For example, any of the following layer names generates two files—foo 1.png and foo 2.jpg—from the tagged layer:
    foo 1.png,foo 2.jpg
    foo 1.png, foo 2.jpg
    foo 1.png+foo 2.jpg
    foo 1.png + foo 2.jpg
  • Do not add a space character between an absolute size dimension and its unit. For example, the following layer names are invalid:
    80 x 100 px imagename.png
    4 in x100 imagename.png
    90 mm x120 cm imagename.png
  • Do not add a space character between the layer name and the suffix. For example, the following layer/layer group name is invalid:
    100×100 imagename.png 5%

Mixing units

While specifying the size parameter, it’s OK to mix and match the supported units—px, cm, mm, and in.

If no unit is specified for a dimension, Photoshop assumes it to be px.

Examples:

  • 80 x 100px foo.png
  • 4in x100 foo.png
  • 90mm x120cm foo.png

Wild cards

While specifying absolute sizes, you can use the ? wildcard in place of a dimension.

Examples:

  • 100x? foo.png
  • ?x60in foo.png

Hyphenated quality parameters

You can add a hyphen before the quality parameter (suffix) to make your layer/layer group names more readable.

Examples:

  • foo.png-8
  • foo.jpg-100%
  • foo.png-32

Some other Don’t’s

  • Don’t use unsupported units.
  • Don’t mix absolute and relative sizes. For example, the following layer name is not valid:
    50% 80×100 foo.png
  • Don’t specify out-of-bounds values. For example:
    foo.jpg-101%
    foo.png-42
    0% foo.png

That’s all for now! Hope you have fun using Generator and other exciting enhancements in the September 2013 release of Photoshop. In case you haven’t already reviewed the What’s New, here’s the link.

 

Two new best practice articles now live…

We’ve just published two new articles in the CQ best practice series:

A list of the five articles published so far is at this URL. In the days to come, we’ll post more best practices, tips, and tricks that you can apply to your work.

Stay tuned!

Content Services ES2: Improving performance

Thumbnail image for livecycle.jpg

You can disable content indexing to improve Content Services ES2 performance. However, keep in mind that disabling indexing will also disable text-based search within new content. To disable indexing:
  1. In the adobe-contentservices.ear file, navigate to
    LiveCycle Content Services.ear/contentservices.war/WEB-INF/classes/alfresco/model and open the contentModel.xml file for editing.
  2. Locate the following line:
    <type name=”cm:content”>
  3. Set the index enabled and tokenized properties to false.
  • Change <index enabled=”true”> to <index enabled=”false”>.
  • Change <tokenized>true </tokenised> to <tokenized>false </tokenised>.
For additional performance improvements, you can disable the conversions required for indexing. To disable conversions:
  1. In adobe-contentservices.ear, browse to
    contentservices.war\WEB-INF\classes\alfresco\extension.
  2. Preserve a backup of the custom-metadata-extractors-context file.
  3. Delete this file from the EAR.

FrameMaker tips article in Indus

FrameMaker iconI recently contributed an article on my favorite FrameMaker tips to Indus, the newsletter of the India chapter of STC. Check out the article here!