Script for Converting Object PNGs to Black Masked Background PNGs and Blank Nib Pack for Corel Photopaint X4

Script for Converting Object PNGs to Black Masked Background PNGs and Blank Nib Pack for Corel Photopaint X4

Good evening everyone! I am now on a new PC that I just built so I can finally work on those huge 300 DPI poster images without taking 10 minutes each time I try to do something in Corel Photopaint. Along with my upgraded PC I also went ahead and updated to the latest version of CorelDraw Suite X4. I’ve updated from version 12, so I’ve missed quite a few versions over the last couple of years so I’m getting used to the new changes and features and I am trying to work out some kinks.

First off, I am VERY happy to see that X4 has FIXED the NIB problem! I can now delete and add nibs and the thumbnails aren’t all screwed up! If you’re not sure what I am talking about, you can check out some posts I’ve made on the matter here:

It’s Official – Nib Bug is Unresolved Bug in Photopaint

Corel Photopaint Nib Error Explained… and it’s still a bug in X3!

So now that they’ve got the NIB problem fixed, I should be as happy as a pig in mud right? Nope, Corel has decided to throw a new problem in to the mix. You might remember a tutorial I wrote awhile back on How to import Photoshop ABR brushes in to Corel Photopaint. In one of the steps, we talk about opening up a PNG image, and in Corel Photopaint 12, 32 bit PNGs open up as a mask on a black background. So, all you had to do was click on “Create Nib from Mask” from the Nib toolbar and you were all set. Well now, when you open a PNG in Corel Photopaint X4, the PNG loads as an unmasked object on a blank transparent background.

Now, you can create a mask of the object and add that as a Nib, but it doesn’t work properly, the Nib seems to be inverted. So, the manual process here is to create a mask from the object, change the background color to black, then merge the object with the background and then add the Nib.

Let me first say, at this point I have no idea if there is a setting in X4 so that PNGs open as a masked black background. I’ve looked on Google and found a couple of people reporting the same issue, but no solution has been found. If I find one, I’ll be sure to post it, or if you know how to set this, please click the comment button below and share the knowledge!

In the meantime, I created a quick little Corel Script (.csc) to automate the process of creating the mask and merging it to a background. I have also included a new blank .Nib pack so you can easily have an empty template to create Nib packs.

Click here to download the Script and blank Nib pack.

This script and Nib file is confirmed to work in X4, but I suspect it will work in any of the X versions as well as 11 and 12.

Here’s what the script looks like:

Simple eh? If you’ve never used scripts before, they are extremely handy and a HUGE time saver. Here’s how you load this script:

1. Unzip the file and save the .csc file somewhere handy
2. Open Corel Photopaint
3. Set the background color to black
4. Click on Windows » Dockers » Recorder
5. The Script Recorder will now open… click on the folder icon and browse to where you saved the script file you downloaded.
6. Open the PNG file
7. Press the Play button on the Recorder Docker and you’re done!

PLEASE NOTE that you must have black selected as the background color before running the script!


And this is what you will end up getting… the object on transparent background becomes a black background with a mask of the image:

Once again though, Corel has failed to allow us to create a blank Nib file from the menu, so I went ahead and deleted every Nib from the default one and saved it as a blank template for you. So if you want to create a Nib pack of just leaves for example, you can load the blank template, save it as LEAVES.NIB and start adding your Nibs!

WARNING!!! Remember to first save the blank template as something else BEFORE you start to add Nibs. Remember, when you make changes to a Nib, it’s automatically saved right on the spot, so don’t make the mistake of adding Nibs to your blank template or deleting stuff you shouldn’t. For example, let’s say you load the blank template you downloaded and add a bunch of Nibs to it, then you do a ‘save as’ and call it mynibs.nib. Well, not only do you now have Nibs in that mynibs.nib file, but if you go back to the blank Nib template, you’ll notice it now has all those Nibs too! Oops! So remember that changes to the Nibs are saved real-time, make sure you are changing the right file!!!

If you’re reading this and wondering how you’re supposed to load the blank Nib template or how to add the Nibs, please be sure to read the tutorials I wrote on how to do this:

Importing Brushes – How to import Photoshop ABR brushes in to Corel Photopaint! Learn how you can import Adobe Photoshop .ABR brush packs into Corel Photopaint and CorelDraw and use them as nibs on your brushes!

How to Load and Install Corel Photopaint NIB Brush Packs! Learn how to install NIB packs in to Corel Photopaint and learn about why working with the Nibs management is so difficult!

So let’s have a round of applause for Corel for finally fixing the Nib thumbnail problem… Bravo! Now, please fix these other 2 issues:

1. Would be nice to be able to create a new blank Nib template by clicking New in the Nib menu.

2. The 999 pixel limitation for Nibs sucks! I’ve got Photoshop brushes twice that size, but I have to reduce them to 999 pixels so I can work with them in Photopaint. Boooooo!

With that said, I am going to start working on some new packs for you guys to download, it seems the first few I made have been extremely popular. The old ones though are screwed up, they contain all kinds of different brushes, not just what the pack is supposed to be. I’ll work on cleaning those up as well as provide you guys with new pack conversions.

That’s it for now, enjoy!
Dan

UPDATE September 18, 2008

I was browsing the CorelDraw forums and I found this:

Hi,
this (mis-)behavior was intruduced in Photopaint X3 SP2. Corel states this as a new Feature:

GIF/PNG

  • Transparencies are preserved and displayed correctly when opened with Corel PHOTO-PAINT. Previously, transparencies were viewed as masks.
  • Image color and alpha channel transparencies are maintained on import into CorelDRAW.

  • Unfortunately the Second point is wrong! There seams to be no way to get back the color-information in 100% Transparent areas.

    Photoshop suffers this same misbehavior since a long time (i think ever), but there is a 3rd party import/export-plugin “superPNG” correcting this and opening PNGs with a mask. Sadly this plugin doesn’t work with Photopaint (“File Format Plugins”,.8be), eaven if photoshop-filter-plugins (.8bf) do work in Photopaint.

    @Corel: It would be greatly appreciated, if there would be a way to open PNGs without loosing imageinformation. Just as in all former Corel Versions.


    So looks like this was done by Corel on purpose and there is no way to set it back to how it worked before.

    One thought on “Script for Converting Object PNGs to Black Masked Background PNGs and Blank Nib Pack for Corel Photopaint X4

    1. sorry to say the script doesnt work in Corel PP v.12.
      I’m getting runtime errors nr.611
      Can you tell me the correct script for v.12 ?
      thanks. Bas

    Leave a Reply

    Your email address will not be published. Required fields are marked *