Suz's Place hummer


PSP X Tips & Tricks
181 - 200


Previous Page   ~   Index   ~   Next Page


dot 181 Turning WMF Files Into PSP Shape Files
Here's a method that will allow you to save .WMF files as shape libraries in PSP:
  1. Open the wmf file in PSP.
    Note: Be sure you have 'Import vector data' and 'Apply dmoothing' checked in Preferences (File...Preferences...File Format Preferences, on the Metafile/Import tab). If the vector objects edges are still jagged when the shape file is imported, see notes after the next step.
  2. With the Pick tool, select all objects in the image by clicking at (0,0) in the upper left corner and dragging all the way to the lower right corner. In the Layers palette, all objects comprising the image should now be selected.
    Note: Sometimes not all objects comprising an image are selected using this method. If an object is not completely surrounded by the Pick tool selection rectangle, it will not be included. Any missing objects can be added to the selection by holding down the SHIFT key and clicking on the object name in the Layers palette.

    If the objects still have jagged edges, once all objects are selected, right-click, choose Properties and check Anti-alias.

  3. In the Layers palette, right-click on any of the selected sublayers, or objects.
  4. Choose Group from the context menu - this will add a new sublayer called Group 1 just below the Vector 1 layer.
  5. Rename the Group 1 layer to what you want to call the shape - this will be the name that will show up when you use the Preset Shape tool.
  6. Choose File...Export...Shape to export the shape library.
    Note: It doesn't matter what name you use in the 'Enter file name' in the Export Shape Library dialog. This is just the file name and not the name that will appear in your shapes list (the name you used when you renamed the Group 1 layer is the name of the Preset Shape that will appear in your shapes list). However, it is an excellent practice to make these names match.

To retain the colors from the original image, ensure that 'Retain style' is checked on the Tool Options palette. And that's all there is to it.


dot 182 Brush Tips, Presets, Options, and Variance
(A Brushes 101 Article Contributed by Fred Hiltz)

Paint Shop Pro brushes come in two kinds: those that work on raster layers and those that work on art media layers. In this article we are concerned only with the raster-layer brushes; specifically with how to set their many options to get the behavior that you want. These brushes are:

  • Airbrush
  • Background Eraser
  • Burn
  • Change to Target
  • Clone
  • Color Replacer
  • Dodge
  • Emboss
  • Eraser
  • Hue Up/Down
  • Lighten/Darken
  • Paint Brush
  • Push
  • Saturation Up/Down
  • Sharpen
  • Smudge
  • Soften

Please open a new image of 300 x 300 pixels, white raster background. The discussion to follow will make more sense with this image and two palettes in view. The Tool Options palette lacks room for all the brush options. The less well known Brush Variance palette contains more, some of which may surprise you. To make these palettes visible, press F4 and F11 respectively.

Our purpose is not to describe the individual options--Help does an adequate job of that--but to explain how they are collected into brush presets and brush tips, and how these collections interact.


  1. Brush Presets

    Like most tools and dialogs in PSP, brushes have presets: named collections of options that you can pick from a list to quickly set many of the options for a brush. PSP comes with several presets and you can make your own.

    Presets that come with PSP contain settings for all the options on the Tool Options palette and all the options on the Brush Variance palette. When you create a preset, however, you may choose to omit any of the settings. When you save your preset, click the Options button to see the "Preset includes" pane, where you can click an option's diskette icon, marking it with a red X to omit it. (Note: you get just this one chance to omit an option in this way. You can, however, edit the script that implements it at any time.) What becomes of an omitted option? That story gets its own chapter later.

    PSP implements presets as scripts stored in files with the PspScript extension. To see the options in the script, find the presets folder with File > Preferences > File Locations > Presets. Open a script file with Notepad.

    A preset applies to just one tool, the one for which it was created.


  2. Brush Tips

    A brush tip is another named collection of options that you can pick from a list. Brush tips differ from brush presets in several ways.

    A brush tip:

    • applies to any raster brush tool;
    • cannot set some options on the Tool Options palette;
    • does not let you select which options to include;
    • comprises two files: a tip image and an options script.

    A brush tip can set all of the options shown on the Brush Variance palette and the following options from the Tool Options palette: Shape, Size, Hardness, Step, Density, Thickness, and Rotation. Although you cannot choose individual options to include or omit, you can elect to include all the Brush Variance options or none of them.

    The shape of a tip may be one of the standard shapes (round or square) or it may be a custom shape. In the latter case, PSP saves that shape as a greyscale image in a file with the PspBrush extension along with the PspScript file that stores the options. Find their folder with File > Preferences > File Locations > Brushes.


  3. Creating and Sharing Brush Tips

    PSP provides three ways to create a custom brush tip:

    1. File > Export > Custom Brush creates a brush tip from the active image (up to 500 x 500 pixels size), using the greyscale values of the image. The darker the image, the stronger the brush impression will be.
    2. "Create brush tip," a button on the brush tips drop list in the Tool Options palette, creates a brush tip modified from the current brush tip. Double click a brush tip to make it current, adjust the brush options to suit, then return to the list and click this button.
    3. "Create brush tip from selection," another button on the brush tips drop list in the Tool Options palette, creates a brush tip from the selected portion of the image. When no selection is present, PSP uses the entire image, equivalent to method a.

    "Export > Custom Brush" is a bad name for method a. It exports nothing. In fact, all three methods write the tip's files in the "Save to" folder specified in File > Preferences > File Locations > Brushes.

    To export your brush, you need to send one or two files. Look in the "Save to" folder with Windows Explorer for a file named "BrushTip_xxxxxxx.PspScript" where xxxxxxx is the name of the tip. Look also for the custom brush shape file named something like "xxxxxxx.PspBrush." (This file is absent when a tip uses one of the standard shapes, round or square).

    WARNING: PSP sometimes, but not always, generates duplicates of the PspBrush file with similar names, which may not be exactly the same as the name of the companion PspScript file. When there is any doubt, open the PspScript file in Notepad or another text editor and find the name of the correct shape file to export. It appears in a line beginning with 'CustomBrush'.

    To import a brush tip, copy the PspScript file and the associated PspBrush file, if any, into any convenient folder. File > Import > Custom Brush. Click Open and browse to the folder where you put the new files. You should see the PspBrush file there. Select it and continue the Import Custom Brush dialog, which copies the files into the "Save to" folder specified in File > Preferences > File Locations > Brushes.

    WARNING: Several brush tips can share a single PspBrush shape file. When you try to import one whose shape file is already present, PSP objects. Likewise, you cannot import a tip that uses the standard round or square shape, as it has no PspBrush file. In these cases, do it "by hand:" Use Windows Explorer to copy the PspScript file and, if present, the PspBrush file into the "Save to" folder specified in File > Preferences > File Locations > Brushes. Exit PSP and restart PSP. The new tips will appear in the drop list.

  4. Variance

    Default is not normal.

    Huh? That meaningless sentence is intended to draw your attention to the confusing labels and names in the Brush Variance palette. Let's translate them into more useful terms.

    "Option" is not a bad label, indicating what PSP option will be varied by your choice of setting. Color blend, Hue, Saturation, and Lightness refer to the Materials palette. The others refer to the Tool Options palette. "Color blend" is a misnomer that should be "Material blend," referring to how the blend of foreground material and background material varies with your choice of setting.

    "Setting" is easier to understand as "Is varied by." Read, for example, "Size is varied by pressure." The choices marked with asterisks are hardware tablet controls. Others are little demons inside PSP that make an option fade in, fade out, vary with direction, etc.

    "Normal" has nothing to do with what you, I, or the Corel designer consider to be normal. It means "none" or "nothing." Pick this setting to prevent variation of an option by any control. Read, for example, "Hue is varied by nothing." Note, however, that a non-zero Jitter will still make the option vary randomly.

    There are three ways to get the PSP default settings. To default just the variance options, select the brush tip named +Default or click the curved arrow on the Brush variance palette. To default all the options on the Tool Options palette as well, click the curved arrow in the Presets drop list.

    The default settings are Normal for all but Size, whose default is Pressure. If you used PSP 9, which defaults to Normal for size as well, this may surprise you.

    Default is not normal.


  5. Who Wins?

    Given all the ways to change a brush's options, which ones work when? Does a preset override a brush tip or vice versa? End the confusion by learning how PSP handles each method of change. PSP stores the settings in the Windows registry under a separate key for each raster brush.

    1. When you pick a preset from the drop list, PSP copies its settings into the registry, excepting those settings that you marked to omit when you saved the preset.
    2. When you pick a brush tip from its drop list, PSP copies its settings into the registry, excepting the Brush Variance settings if you chose not to include them when you saved the brush tip. PSP also copies the tip shape--round, square, or custom--into the registry.
    3. The Tool Options palette and the Brush Variance palette always show the registry values for the current raster brush tool. When you alter any setting in those palettes, PSP changes the registry to match.
    4. Whenever you fetch a raster brush tool, PSP gets its settings from the registry, even after exiting and restarting PSP.

    In short, the last to save is the winner.


dot 183 Using Plugins in PSP
PSP can use most Photoshop-compatible plugin filters. However, several filters require the installation of two additional files into your WINDOWS SYSTEM folder before they will work. These files are:
  • msvcrt10.dll and
  • plugin.dll.

Though msvcrt10.dll is widely available, plugin.dll is the property of Adobe, and is typically installed with Adobe products. These files are installed in different places, depending on you Windows version:

  • WINDOWS 98 or WINDOWS ME - install these files in the C:\WINDOWS\SYSTEM folder.
  • WINDOWS 2000 - these files go into the C:\WINNT\SYSTEM32 folder.
  • WINDOWS XP - install these files in the C:\WINDOWS\SYSTEM32 folder.


dot 184 Using Alpha Channels
An alpha channel is merely a storage area within a PSP image, a special area for the storage of selections and/or masks! An alpha channel saves information (about a mask or selection you've created) as a greyscale bitmap within the image. PSP can store up to 99 alpha channels with an image, an increase from the limit of 24 in PSP 7. When you try to save the 100th selection or mask, the Save Selection to alpha Channel option will be greyed out. You will have to delete an existing alpha channel before adding another.

Alpha channels are very handy and give more precise results than using the Magic Wand tool to get selections. They are particularly useful on irregular shapes, complex selections, and any selection that has had antialias applied to smooth the edges. Another really cool thing about using alpha channels is they're available whenever you open the PSP image in which you saved them. And they're not only available to the image that contains them, but to any other image open in the PSP workspace at the same time! It's like a mask/selection lending library!

When you save the image in PSP format, the alpha channels are saved with the image, and will be available when you open the image again! If you save the image in JPEG or GIF format, and do not save it in PSP format, when you close the image, the channels and all the information they contained are gone forever! Zippo! Disappeared! All your work down the drain! So, if you go to the trouble to retain information in those alpha channels, save the image in PSP format! Incidentally, the PSP format is the only format, to my knowledge, that allows the user to save information in multiple alpha channels!

To save a selection to an alpha channel, choose Selections...Load/Save Selection...Save Selection to Alpha Channel to open the Save Selection to Alpha dialog box. The Add to Document panel contains the image name in the "Add to document" drop-list. Below the image name is a drop-list of all alpha channels in the document, if there are any. The Name panel contains the default name for the alpha channel - type a new name in the "Name" edit box to change this name. The Preview panel shows a preview of the selection being saved. Click the Save button to save the selection to the alpha channel.

To load a selection from an alpha channel, activate the layer on which you want to place the selection, and then choose Selections...Load/Save Selection...Load from Alpha Channel to open the Load From Alpha dialog box. To load a selection from the active image, leave the current image name in the "Load from document" box. To load a selection from another open image, use the "Load from document" drop-list to find the image, and highlight its file name. Then, in the drop-list below the document name, choose the alpha channel that contains the selection you want to load.

Note that the Load Selection From Alpha dialog allows you to either replace any current selection, add the selection in the alpha channel to the current selection, or subtract the selection in the alpha channel from the current selection. This might be useful in building selections of particular shapes.

To delete a selection that has been saved to an alpha channel in the active image, choose Image...Delete Alpha Channel. This opens the Delete Alpha Channel dialog. Select the alpha channel (selection) that you want to delete from the Alpha channel drop-list, or mark the "Delete all alpha channels" check box, and click the Delete button.


dot 185 Making Shapes Specific Sizes
When you draw a selection using the Selection tool, or a shape using one of the shape tools (Preset Shape, Rectangle, Ellipse, or Symmetric Shape) the Info Tab of the Overview palette provides some valuable information. Let's look at the Selection tool. When you begin drawing a selection, several numbers appear on the palette:

overview palette - selection tool

Look at the boxed entries at the bottom of the palette. The first of these, called Upper Left, contains the coordinates of the upper left corner of the selection. The second, called Lower Right, indicates the coordinates of the lower right corner of the selection. Either one or both of these sets of numbers will continue to change until you stop moving the cursor. The third pair of numbers, called Size, represents the actual dimensions of the selection expressed as width by height. This, too, will change as you move your cursor. Finally, the last number is the aspect ratio of the selection, which is derived by dividing the width by the height.

Note:If the selection is not a square or rectangle, the values in the Overview palette represent the corners and dimensions of an imaginary rectangle surrounding the selection, called the "bounding box" of the selection:

selection bounding box

The above screen shot was taken as I made an elliptical selection. I've added the Overview palette from the same screen shot so you can see the values. I also drew in the "bounding box" of the selection in red - this rectangle represents the smallest rectangle that fully surrounds the selection. Note that the Upper Left value from the Overview palette represents the upper left corner of the bounding box (green arrow). Likewise, the Lower Right value represents the lower right corner of the bounding box (red arrow). I've left the rulers in the screen shot, so you can see that those values truly belong to the bounding box.

The same information seen in the Overview palette is also reflected on the right end of the status bar at the bottom of your screen:

selection tool status bar

In this case, the first pair of coordinates indicates the upper left corner of the selection and the second pair indicates the coordinates of the lower right corner of the selection. The equal sign is followed by the size of the selection, width x height, followed by the aspect ratio (in square brackets) rounded off to 3 decimal places.

The Overview palette provides similar information when you draw shapes using either the Rectangle, Ellipse, or Symmetric Shape tool. Here's a screen shot or the Overview palette for the Rectangle tool:

overview palette - rectangle tool

Strangely enough, the aspect ratio is not shown in the Overview palette, but it does show (on the right end of the Status bar at the bottom of your screen) when any of these tools is used.

Finally, when the Preset Shape tool is used to draw a shape, the Overview palette looks like this:

overview palette - presetshape tool

You'll notice the format is a little different here, with Start pos and End pos instead of Upper Left and Lower Right, and Width Height rather than Size. It's the same information - just different names used to identify it. Again, the aspect ratio is not provided in the Overview palette. Nor is it shown on the right end of the status bar, which provides color information. Instead, this information is provided on the the LEFT end of the status bar at the bottom of your screen. Here's the left end of the status bar captured at the same time as the above Overview palette:

preset shape tool status bar


dot 186 Saving Transparency In TGA Files
Transparency can be saved in TGA files by making a mask from the image opacity, storing it in an alpha channel, and deleting the mask (no merge). This might be a helpful for those who use TGA files for games or rendering.

Here's the process:

  1. Choose Layers...New Mask Layer...From Image. Choose Source Opacity with Invert Mask Data unchecked. Ignore the slight change in the appearance of your image. This step will copy your image transparency to a mask.
  2. Choose Layers...Load/Save Mask...Save Mask To Alpha Channel. The name you use doesn't matter. This step places the mask data in the alpha channel, which in turn means that a copy of the original image transparency ends up stored in the alpha channel.
  3. In the Layers palette, right-click on the mask layer and choose Delete from the context menu that appears. Answer "No" to the dialog which asks "Would you like this mask merged into the layer below it?". This step gets rid of the mask, which was just a temporary intermediary for placing a copy of the transparency in the alpha channel.
  4. Choose File...Save As. Select Truevision Targa (*.tga) as the save type. Press the Options button and make sure the Bit Depth is specified as 24 bits. For greatest compatibility specify Uncompressed. Then go ahead and save the file.


dot 187 Color Sampling In PSP
There are many instance in which the Dropper tool is used to sample colors from images. This can occur when other tools are active, and/or when dialogs with color boxes are active. However, the way that sampling is done is not always the same, and often depends on the 'Sample size' parameter previously set for the Dropper tool on its Tool Options toolbar, regardless of the active tool or dialog. Here's what I've discovered:
  1. PSP samples using the square set by the Dropper 'Sample size' in the Dropper tool Tool Options palette in the following cases:
    • The Dropper tool is active and is being used for the sampling.
    • Sampling is being done by using the CTRL key + a painting tool (Paint Brush, Flood Fill, Eraser, etc.).
    • Sampling is being done from within the Material Properties dialog.
    • Simple sampling (without the CTRL key pressed) is being done from Effects and Adjustments dialogs that have color boxes.
  2. PSP samples a single pixel, ignoring the Dropper 'Sample size' in the Dropper tool Tool Options palette in the following cases:
    • CTRL key sampling from the Materials palette Materials or Color boxes.
    • CTRL key sampling from Effects and Adjustments color boxes.
    • Smart Photo Fix sampling within the left preview pane.
    • Color Balance (Advanced Options) sampling within the left preview pane.
    • CTRL key sampling from the color boxes in the Vector Property dialog.

This explains why sometimes when you sample from an image, you don't get the color that's under the sampling dropper, which can be very frustrating. Depending on what tool is active, what dialog is being used, and whether or not you are doing CTRL key sampling, you might be getting an average of a group of pixels rather than the single pixel beneath the sampling dropper. If you are using any of the methods listed in #1 above, whether you were aiming for a larger-than-a-single-pixel sample or not, that's what you'll be getting. The "cure" is to set the Dropper tool 'Sample size' to 1 Pixel. Hopefully, in a future release of PSP, this sampling inconsistency will be corrected so that all sampling (other than that done directly with the Dropper tool) will be for the single pixel below the sampling dropper.


dot 188 Moving/Adjusting the Crop Area Rectangle
Once the crop area rectangle has been added to an image, it can be moved by dragging on one of the handles:
  • To move any of the sides, click and drag anywhere along the side of the crop area rectangle - the cursor becomes a double-headed arrow crop side mover cursor
  • To move the entire crop rectangle, click and drag anywhere within the crop area rectangle - the cursor becomes a four-headed move arrow crop rectangle mover cursor
  • To constrain the crop area to it's current proportions, check the "Maintain aspect ratio" check box on the Tool Options palette.

You can also move the crop area rectangle in increments using the arrow keys. The process is similar to that for moving selections or vector objects, with this exception - you choose how you want the crop area rectangle to be moved first by clicking one of the crop area rectangle handles first:

  • To move the entire crop area rectangle, click the center handle.
  • To move one of the sides, click the edge handle on that side.
  • To move either of two connecting sides, click the corner handle shared by those two sides.

Once you've selected a handle to guide your moving, the process is the same as moving selections or vector objects:

  • To move the crop area rectangle (or a side of the crop area rectangle) one pixel, press any arrow key.
  • To move the crop area rectangle (or a side of the crop area rectangle) 10 pixels, hold down CTRL and press any arrow key.
  • To move the crop area rectangle (or a side of the crop area rectangle) 50 pixels, hold down SHIFT and press any arrow key.
  • To move the crop area rectangle (or a side of the crop area rectangle) 100 pixels, hold down SHIFT and CTRL and press any arrow key.
    Note: The handle you choose or make active governs which arrow keys "work". For example, if you choose the edge handle on the right side of the crop area rectangle, the left and right arrow keys will move that side, but the up and down arrow keys will have no effect at all. However, if you choose the top corner handle on the right side of the crop area rectangle, the left and right arrow keys will move the right side left and right, and in addition, the up and down keys will move the top of the crop area rectangle up and down.

One additional caution - if the "Maintain aspect ratio" check box is selected, the moving process for the crop area rectangle is slightly altered. Even though you choose the edge handle on a particular side, when you click and drag that handle (or use the arrow keys to move that side) you will see movement of the crop area rectangle not only along that side, but also along both adjoining sides as well. This is necessary in order to maintain the aspect ratio of the original crop area rectangle. If you want to constrain the movement of the crop area rectangle to only one of the adjoining sides, choose the corner handle adjoining those sides rather than the edge handle on that side before you click and drag (or use the arrow keys to move) that side.


dot 189 Copying and Pasting Won't Work Anymore
When suddenly your Copy and Paste functions no longer work in PSP, check to see that you do not have any web pages open that prevent copying of images. This will actually prevent copying and pasting in PSP. If this happens to you, close all web pages and try the copy or paste function again in PSP. It will probably work.


dot 190 Lynda.com Training Videos
Learn all about Paint Shop Pro X by watching it in action. These tutorials will show you how to make the most of this brand new version. These are fabulous training videos, which will help the new user get started with Paint Shop Pro, and refresh concepts and ideas in the minds of seasoned PSP users as well. For those with the boxed version of Paint Shop Pro X, the training videos are included on the installation CD. For those who downloaded Paint Shop Pro X online, the videos are available from the Corel site. You can download and save the videos onto your hard drive, or pick a training topic and view the movie from the Corel page, which you can access HERE.


dot 191 Support for Early Versions of PSP
Need support/patches for an old version of PSP? Check out this link:
http://www.jasc.com/support/updates


dot 192 Adjusting Brush Size Using the Keyboard
For a quick way to change the size of any of the brushes in PSP, hold down the ALT key and using the left mouse button, drag your mouse forward to decrease the size of the brush, or backward to increase the size of the brush. You may have to release the mouse button and then press it again to get this to work.

Other keyboard shortcuts include the following:

  • To increase brush size by 1 pixel, hold down the ALT key and press C.
  • To increase brush size by 20 pixels, hold down SHIFT + ALT and press C.
  • To decrease brush size by 1 pixel, hold down ALT, and press X.
  • To decrease brush size by 20 pixels, hold down SHIFT + ALT and press X.


dot 193 Repositioning Toolbars and Palettes - and Docking Issues
First of all, the docking of palettes is governed by settings in Preferences. If you do not want a palette to dock at any time, remove the check from the checkbox for that palette in Preferences...General Program Preferences, on the Palettes tab (or choose View...Docking Options to get the same dialog). If you want to temporarily disable docking for a palette without changing Preferences, hold down the CTRL key while dragging the palette to its new position. This will allow you to place the palette anywhere, even near the edge of the workspace, without it snapping into a docked position.

There is no comparable control in Preferences for toolbars, which dock automatically whenever they are dragged to the edges of the workspace. To prevent this from occurring, hold down the CTRL key while dragging the toolbar.

For a quick way to UNdock (or float) a docked toolbar or palette, double-click on its handle or title bar (you'll get the four-sided mover icon) - it will undock, and return to its last undocked position. To quickly dock an undocked toolbar or dockable palette, double-click on its title bar - it will dock to the top of the workspace, or its last docked position.

Note:: The handle size and position (toolbars) vary, depending on the size of the toolbar and whether it is vertical or horizontal. Here's what the "handle" looks like for my horizontally-docked Script toolbar, enlarged to 300% for easier viewing:

script toolbar handle


dot 194 Maintaining Aspect Ratio When Resizing Selections or Layers
To maintain the aspect ratio when resizing layers, use the Pick tool (or the Deform tool, still available in PSP X using its shortcut key, D), LEFT-click, and drag from a corner. To maintain the aspect ratio when resizing selections, activate Edit Selection (Selections...Edit Selection) and using the Pick tool (or the Deform tool), LEFT-click, and drag from a corner.
Note: This is a change from previous versions, which used right-clicking for this function.


dot 195 Getting Consistency in Text Size in PSP X Scripts
PSP X introduces a choice of Points or Pixels for size in the Text tool's Tool Options palette. Unfortunately, this change is not completely implemented in scripting. PSP X scripts use Points only. This may cause visible differences in text size across images of differing resolutions, as well as images created using different units. To ensure consistency in text size across all images, and to ensure that text "appears" the same in PSP X as in previous versions, script writers can add this code to PSP X scripts:
PointSize = ConvertedPointSize = ??
### Use the above line to set the Size for the font for the text
Display = 96
Prop = ScriptProperties()
if Prop['Host Version'][:2] == '10':
    Version = App.Do(Environment, 'GetVersionInfo')
    if Version['MajorVersion'] == 10:
        ImageInfo = App.Do(Environment, 'ReturnImageInfo')
        Resolution = ImageInfo['PixelsPerUnit']
        Units = ImageInfo['Unit']
        if Units == 'Inches':
            ConversionFactor = Display / Resolution
        else:
           ConversionFactor = Display / Resolution * 2.54
        ConvertedPointSize = PointSize * ConversionFactor

A few notes about this code:

  1. It is only needed in cases where three conditions are met:
    • The script is running in PSP X.
    • The Host Version parameter in the script indicates this is a PSP X script - that is, it contains 10 (or 10.00, 10.01, 10.02, or 10.03).
    • The script is running the TextEx command.
  2. In all other instances of scripts running in PSP X, the system makes the required conversions. If the Host Version contains anything other than 10, or is blank, or the text is being written using the Text command rather than the TextEx command, PSP makes the required conversions.
  3. This code will not hurt scripts running in previous versions of PSP because it is only effective if both the Host Version and the running version are identified as being PSP X. Nor will it impact scripts that contain the Text command. What it will do is prevent strange-looking text from happening in scripts identified as PSP X scripts, running in PSP X, with the TextEx command.
  4. The first line of the code is used to assign the font size to a variable called PointSize - the ?? will need to be replaced with the size wanted for the font. At the same time, the same value is assigned to the ConvertedPointSize variable. This will prevent script errors when the ConvertedPointSize variable is incorrectly used in an instance when the conversion code does not run - either because the Host Version parameter does not identify the version as 10, or the Text command is being used, or the script is running from PSP 8 or 9.
  5. Finally, the code contains a line near the beginning identifying the screen resolution as 96. This is the default screen resolution, and as such, will be the screen resolution used by most systems. However, some users will have changed this value to 120 (or a custom value) if 96 makes screen items too small to view comfortably. Users can determine their screen resolution setting in the following manner:
    • Choose Start...Control Panel...Display.
    • Click the Settings tab.
    • Click the Advanced button - the DPI setting can be found in the Display panel at the top of the dialog.

    Users who have something other than 96 here will need to change the first line in the conversion factor code to reflect this setting. If you as a script writer decide to implement this code, you will want to warn users of this. The alternative to having users manually edit the code to insert their DPI settings is having the script extract the screen resolution setting from the Registry. That alternative would require that scripts implementing this code run from a Trusted folder. In my opinion, that's not a safe alternative, so the associated code is not being provided.

The last step needed to implement this code is to change the PointSize parameter in the TextEx command from whatever it is, for example:

'PointSize': 24,

to:

'PointSize': ConvertedPointSize,

Thanks to the readers of the Corel scripting newsgroup for their contributions to this tip!


dot 196 Changing the Angle of A Selection
To change the angle of a selection, choose Selections...Edit Selection - the selection will appear as a ruby overlay. Activate the Pick tool (or the Deform tool). For precise control of the angle of the selection, use the Angle parameter on the Tool Options palette. To rotate the selection in 15-degree increments, press the SHIFT key while dragging the rotation handle (the square connected by a line to the rotation pivot point):

deform or pick tool rotation

When you have finished rotating the selection, choose Selections...Edit Selection again to display the selection marquee.


dot 197 The BrushWrangler Script
Joe Fromm has written a script called BrushWrangler that aids in managing a collection of brushes. Here is Joe's explanation of the BrushWrangler script, paraphrased from the comments within the script:
This script aids in managing a collection of brushes. A custom brush consists of two files - a .PspBrush file which contains the actual brush impression, and a .PspScript file which contains the parameters used by brush:
  • .PspBrush files are images, and can be viewed in the browser. A single .PspBrush file can be referenced by any number of .PspScript files. In the BrushWrangler script, the .PspBrush file is referred to as the brush tip file.
  • .PspScript files are Python code, and (among other things) contain the name of the associated PspBrush file (the .PspScript file could also reference the standard round/square brushes, but that is not relevant here). In the BrushWrangler script, the .PspScript file is referred to as the brush settings file.

Brush tool presets are also .PspScript files, but are named differently and live in a different directory. Unlike a brush settings file, a tool preset is tied to a particular tool (airbrush, paintbrush, eraser, etc.). However, since a tool preset is a superset of a brush settings file, they can in some ways take the place of a brush settings file.

The brush dropdown on the tool options palette is populated by reading the brush settings file, so if a brush tip file is not referenced by any brush setting file the tip is essentially orphaned since the user has no way of selecting it (save by possibly a tool preset, which is only good for that tool). Conversely, a brush settings file or tool preset that references a non-existent brush tip file is useless since the brush tip can't be found.

BrushWrangler has the following functions:

  1. It will detect orphaned brush tip files and either create a basic brush settings file so that the brush tip can be used again, delete the orphaned brush, or do nothing.
  2. It will detect brush settings files that reference non-existent brush tips and optionally delete them.
  3. It will detect tool presets that reference non-existent brush tips and optionally delete them.

At times, orphaned brushes and brush settings and preset files that reference non-existent brush tips can cause your system to bog down, and/or cause long waits when changing to and from brush tools. If you're having these or similar problems, and everything else is in order, it's probably time to call on the BrushWrangler! You can download Joe's excellent utility script HERE - posted with Joe's permission. Note that due to the nature of the facilities this script uses, it must run from a Trusted folder.

When the BrushWrangler has completed its work, reset your cache (choose File...Preferences...Reset Preferences and check 'Delete all cache files'), then stop and restart PSP - things should definitely look better.

For more on brushes, see #088 Using Custom Brushes in PSP X which explains what you see (or don't see) when you have a brush tip and no settings, or settings with no associated brush tip, and #182 Brush Tips, Presets, Options, and Variance which provides complete information about brush tips, presets, options and variances and how they interact.


dot 198 Processing *.msk Files Using the Batch Process or Batch Rename Features
For some reason or other, neither PSP 9 nor PSP X allows you to select .msk files in the Batch Process or Batch Rename dialogs. You might want/need to do this if you wish to convert these files to another format, for example, the JPEG format, or if you need to rename a group of files. However, there is a way around this anomaly. If the .msk files to be processed/renamed are first selecting using the PSP Browser, they will show up in the 'Files to process'/'Files to rename' window in the Batch Process or Rename dialogs.

Here's how you can select .msk files for Batch processing in PSP X:

  1. Choose View...Palettes...Browser.
  2. Navigate to the folder containing the .msk files to be processed.
  3. Select the .msk files to be processed:
    1. You can select consecutive .msk files in the folder by clicking on the first .msk file you wish to process and then holding down the SHIFT key and clicking on the last .msk file you wish to process.
    2. You can select non-consecutive .msk files to process by holding down the CTRL key and clicking on each .msk file you wish to process.
    3. You can right-click anywhere in the Browser window and choose Select from the context menu - the Select dialog allows you to select files that have specific file or image attributes, such as name, file extension, size, width, bits per pixel, and date.
      Note: If you choose All Files as the 'Type' attribute, you can use the * as a wildcard in the 'Name' attribute. Here are a few examples:
        *.msk selects all .msk files
        *edge*.msk selects all .msk files which contain 'edge' in the file name
        *edge*3.msk selects all .msk files which contain 'edge' in the file name and end in 3

Once the .msk files have been selected, choose File...Batch...Process (or Rename). You will see the complete path names for the .msk files you selected already listed in the 'Files to process'/'Files to rename' window. Here's a partial view of the Batch Process dialog with several files selected for processing:

files to process in batch process dialog


dot 199 Where to Find Corel's PSP X Documentation
Corel has a lot of documentation available for PSP X, including the Scripting API and the Scripting for Script Authors document. This material can be found HERE.


Previous Page   ~   Index   ~   Next Page



Email


If you have any suggestions for additions to this list, please EMAIL ME.
Please do not post this page, in whole or in part, in any other location.

About Me ~ Home ~ Email

All graphics and content © 2002-present by SuzShook