In amongst some of the new changes in Visio 2013 is the addition of a new ShapeSheet cell in the Foreign Image section. Since I looked at image masking a few years ago (as did Chris Roth), I thought it would be interesting to take a look what you can now do with this new cell.
Preview edition – note that the following is based on Visio 2013 Preview and details or even entire features may change when the product is released to manufacture.
Foreign Image Info
When you drop an image into Visio, it gets wrapped into a shape gaining standard shape behaviour, and that includes a ShapeSheet. However, one difference is an additional ShapeSheet section named ‘Foreign Image Info’ that contains size and position cells and now, a ClippingPath cell. One of the built-in solutions that benefits from this new functionality is the Org Chart.
The Org Chart solution in 2013 now contains variable master shapes that can be swapped at will via the ribbon. Each master type (coin, panel etc.) contains its own geometry against which the image is clipped. This is clever functionality, and something which, in previous versions, would have required a mask covering the areas to be kept hidden (at least for non-rectangular shapes).
Multiple geometries
Now, while the Org Chart shapes contain a single geometry to provide their clipping paths, there’s nothing to stop you pointing to other geometries. The only caveat to this is that the geometry referenced must be within the image shape itself. I say referenced, but you’re not actually providing a cell reference using normal ShapeSheet syntax, but instead the ClippingPath cell expects a string value, for example =“Geometry1.Path” (note that the quotes are required).
Here’s an example of an image shape that contains two geometry sections and respective right click action rows to push the appropriate string into the ClippingPath cell:
…and here’s the resulting shape (in circle mode):
One thing to note here, is the shadow (which I forgot to remove) also appears to adhere to the clipping path as well.
Another option might be to create a mask effect by creating an image stack. To achieve this, duplicate the image (Ctrl+D) and align the two images both vertically and horizontally so that one sits on top of the other. You can then alter the transparency, blur or any other image feature from the ‘Format Picture’ options to highlight a specific region:
This is an interesting effect and similar what Chris and I were aiming for in our image mask posts above.
Unzipped
Ok, just time for one more 2013 feature…
In writing this post I realised that I’d used an image that had a restrictive copyright and so I thought I’d better swap it for one that was a little easier going. (The one I’ve opted for is a lovely photo of a bookshop in Amsterdam from MorBCN on Flickr - Please note the original restrictions if you want to use my adaptations.)
So you’ve got your new image, but how do you swap the image while still retaining the shape smarts such as the multiple geometries, actions and control point? Well, since the new Visio 2013 file format (.vsdx) is based on the Open Packing Conventions so you can just rename the file extension to ‘.zip’
Once you’ve done that you can open it in Explorer and navigate to the media folder:
All you need to do is just drop in your new image, ensuring that the name is the same as the one you’re replacing. Rename the file extension back to .vsdx and you’re done and you can see the new image displayed in the shapes that referenced it.
I think this packaging aspect is pretty exciting and makes for some very interesting code-generated diagram scenarios.