Episode 064

Episode 064 – Bitmap Masking

by Richard Querin

This screencast demonstrates a couple of ways that you can easily use objects in Inkscape to mask out parts of a bitmap image. This idea came from an email from David Hernandez, a viewer who pointed us to this post which demonstrated a grid masking effect using Photoshop.

Granted, I haven’t tried the Photoshop tutorial, I get the feeling that like many other (but not all) things involving the creative use of bitmaps, Inkscape can sometimes be more effective. But hey, I’m biased. ;)

As always, I hope you find it useful – but there are no guarantees ;).

45 Responses to “Episode 064”

  1. screencasters.heathenx.org/blog » Blog Archive » Episode - 064 Bitmap Masking Says:

    [...] Episode 064 is now up. This screencast demonstrates the use of Inkscape’s Object->Clip->Set function for some creative bitmap masking. This idea came from David Hernandez who emailed us about the idea. Thanks David! [...]

  2. Hubbabub Says:

    Greetings from Sweden :-)

    Neat effect,
    I think I’m going to try this one.

    I also want to thank you both for all the other great video tutorials you guys have made.

  3. heathenx Says:

    Excellent tutorial indeed. Nice work Mr. Querin. ;)

  4. Firus Says:

    Again a very nice tutorial !
    Keep on !
    I really enjoy your tuts.

    Greatings from Germany

  5. Don W. Says:

    RQ- Nice effect (do I see a future cast in the intro ;-} with the gray scale and color?)

  6. andy3 Says:

    @Richard: Following your insinuations in the comment section of episode 63, I have a strong suspicion that you must have been either a precursor or a successor to heathenX as the personal assistant of the Amazing Kreskin… Mentalism and magic once again! I guess that spellbound Mister David H. and the repeated dragging of that little cross in front of our eyes were part of the trick ;-)).

    Very useful tutorial!

  7. Richard Querin Says:

    @andy3 – lol

    Actually the repeated clicking and dragging of the crosshair was simply a distraction. I’m busy mind-controlling the viewer into downloading further episodes and leaving nice blog comments.

    See. It’s working. ;)

  8. SureWhyNot Says:

    Excellent! That’s really cool! Nice work with the leaf thing too.

    By the way, I read YOUR mind and knew you were going to mention the reversed perspective selection thing!

  9. dahernan Says:

    Very Nice!!!

    For an amateur designer like me, it’s incredible the result you get.


  10. Serge Gielkens Says:

    I have to admit, Inkscape can be very effective for certain effects with bitmap images. And I am not biased ;-). Good work, Richard; I like to see more of these shows on bitmaps.

  11. Richard Querin Says:

    @SureWhyNot – I’m still bothered by why they changed it. Surely it could be done in either order. Changing it just confuses people. Of course this comes from someone who could barely program his way out of a wet paper bag. ;)

    @dahernan – Thanks TO YOU for the idea! I’m an amateur designer too. I have a very limited bag of tricks, the key is just combining them in different ways.. Shhh don’t tell anyone. ;)

    @Serge – I do quite a lot with bitmap images. Things like the photocurl, the mosaics and stuff are just sometimes so much easier and quicker than with a bitmap program. You look at these photoshop tutorials with 50 steps and 30 adjustment layers and think.. man I’d like to give these people a shake sometimes! :)

  12. SureWhyNot Says:

    @Richard Querin

    Well, if it lets you select either way and both objects are paths Inkscape won’t know what shape is the reference and what shape is the target. I think it makes more sense the new way. Just think “I want THIS to look like THAT.” ;)

    Before it was “I want the next thing I click to look like the first thing I click.”

    And if you ever have trouble with a wet paper bag, just use python and import “exits” :D

  13. Serge Gielkens Says:

    @Richard. You are right. The nature of the operations to perform, not the nature of the image, should determine what application to use.
    If the operations are vector like in nature, like in this tutorial, one should use Inkscape, no matter if they are performed on a bitmap image. If on the other hand the operations are essentially on pixel level, GIMP is the way to go, no matter if the underlying image was created by a vector drawing program. E.g. episode 50 of meetthegimp.org can hardly be done in Inkscape IMHO (although I would be very much interested in seeing you doing this in Inkscape ;-)). Of course, the line cannot always be drawn that clearly.

    By the way, I am not concerned about 30 layers if that is necessary. I see them as objects, like objects in Inkscape. Also in Inkscape the number of objects can grow fast when making complex images. It all boils down to how easily one can manage them. By the way, I see room for improvement here, both in Inkscape and GIMP.

  14. joeda Says:

    Little effort – great effect

    I think that’s how inkscape works. And thanks for the tutorial or I’d still despair making the orb or some of the other kickass effects.

    greetz joe

  15. Richard Querin Says:

    @SureWhyNot – You’re right. And it makes logical sense the way it is now. It’s just that changing something around like that can still be aggravating. Then again, the whole persp. thing was not even working for lots of people using 0.45 anyway.

    @Serge – That sounds like a challenge! :) Actually I’ve been experimenting with the Trace Bitmap function in Inkscape (which can turn a bitmap into a group of paths) for quite a while. And you can get *very* similar functionality out of it, although it turns out more like the Flickr examples that Rolf likes more than the one he came up with. I’ve been thinking about a cast on that for months off and on, but I can’t seem to get a consistent enough and simple enough method yet. i was also toying with the idea of a silhouetting screencast as well which is kinda similar. I did some of that for a linuxbasement podcast wallpaper a while back which you can download at (http://linuxbasement.com/files/u1/lb_dark_silh_tar.gz) . This was done all in Inkscape.

    @joeda – I’m all about the ‘little effort’ part. :) Actually that’s not too much of a joke. I’m always very interested when I see how to achieve something *good* and achieve it quickly or without a colossal amount of effort. Glad you’re finding our stuff useful!

  16. Serge Gielkens Says:

    @Richard. It definitely is! I should admit that I have not used bitmap tracing except for some playing experiments. I got the impression that it is not that easy to get the results right and sometimes even needed preparation by a bitmap editor in case the base image was “too pixel like” or “noisy” (I do not know how to put it but I suppose you will understand what I mean).
    As you already mentioned, the results are more toonish than the one of Rolf’s. I liked that one because it still had still a bitmap appearance.

    I had a look at the wallpaper but I do not understand how this silhouette is related to tracing. I suppose you did not use tracing to create the silhouette, or did you?

    Anyway, a show on tracing is most welcome.

  17. Richard Querin Says:

    No Serge, the tracing is simply something else I’ve been trying to do related to bitmaps.

    I’ve tried several times to get a decent silhouette by using the Path->Trace Bitmap (using MultipleScans by color) but I haven’t been able to get a good result yet. The one you see in the wallpaper example is traced.. simply by a point to point path overtop of the bitmap.

    The aim is to create a silhouette *without* having to trace. But the tracing actually isn’t too bad. Having something like the magnetic selection tool in the Gimp would be nice for that. But I think ultimately being able to get a good silhouette by using the trace bitmap functionality instead would be much nicer.

  18. heathenx Says:


    Rolf’s screencast is more similar to a colored sketch than a cartoon. Take for example my post avatar. That was made from a tracing (not a bitmap tracing) ala Nicu’s tutorial.

    A bitmap tracing is a little more exact. I took Richard’s avatar and ran it through a quick bitmap trace in Inkscape. At 80px x 80px it’s hard to tell that it’s actually a vector and not a raster image.

  19. Richard Querin Says:

    But at 80px x 80px you sure can tell he’s frickin handsome though! You don’t lose that in the transfer from bitmap to vector do ya?

    btw – I’m eating Cheetohs on my in-laws back deck in that shot. I know you all were wonderin’. ;)

  20. Serge Gielkens Says:

    @heathenx. At 80×80 px it’s indeed hard to tell. Impressive indeed. Thanks for your answers.

  21. Jaime Says:

    Hi, thanks for all the great tutorials, you guys are superb!

    I have a question about the mini tutorial (with the maple leaf) at the start of #64. Once the work is finished, what sort of file should we save it as? I am a newbie, learning by doing, but though I was able to follow the tutorial, trying to save the pic as a jpeg doesn’t go. Must I save it as a svg or a png file? I’d like to use it for a website.

    mil gracias,


  22. SureWhyNot Says:

    ehhh, is this really the place to ask that question? Anyway, you have to do a file->export bitmap. That will save it as a PNG image. As far as I know, that’s the only type of file Inkscape can export.

  23. Richard Querin Says:

    Glad you like the tutorials, but superb? I’m not so sure. ;)
    As SurWhyNot says, Inkscape can only save out to a png file. You can use png files for website graphics although I’m not 100% sure how Internet Explorer handles them. I think IE7 likely does fine with them though. Earlier versions of IE, I’m not so sure. All the other major browsers support PNG fully I think. But if you want to use jpg files instead, you can use virtually any bitmap editing software (GIMP, Photoshop, Paintshop Pro, etc etc.) to convert the png files to jpg if you need to. Typically, you just open the png file in one of those programs and save it out as a jpg file. Let us know if you have any problems doing that.

    @SureWhyNot and Jaime
    As far as this being the place to ask this question.. I say yes, sure, of course. ;) We’re happy to answer any questions related to Inkscape from the absolute most basic to the most advanced. The quality of answer you get might be suspect, but we’re glad to field them. Now whether this is the “best” place to answer them, well that might be an entirely different question! :) If you look on the right column of our main page, under the ‘Other links’ section, you’ll see a link to inkscapeforum.com. This is a great place to find answers to all sorts of questions, and a great place to ask them if you don’t.

    Cheers guys.

  24. heathenx Says:

    I believe other exported formats, like jpeg, have all ready been put into the 0.46 code. We’ll have to wait until 0.47 before the switch is turned on though. I would consider png superior to jpeg in terms of vector artwork. Avoid jpeg where you can. On the other hand, jpeg makes the most sense for photo images. Choose wisely. ;)

    Btw, this web site was designed in Inkscape and we use png’s. We only use jpegs for our monitor images so that they will render faster.

    You and others are most welcome to ask us questions especially questions regarding what we have done in an episode. We’ll answer them the best we can. If we think something requires “community” attention then we may point you to the Inkscape forum where more people can get involved.

  25. llogg Says:

    Great tutorial and an effect I really love. One question that came to mind, however, was why you wouldn’t use the clone tool to creat the grid rather than making duplicates. Using the clone tool seems like it would make it simple to ensure you get the right dimensions and be able to edit the shapes of your grid after the fact. Any reason why you chose the duplication technique instead, or just personal preference?

  26. Richard Querin Says:


    No I could have used the clone tool, but I have never really wrapped my head around using it properly. Making the copies and just adjusting the number of rows, columns and spacing just feels more logical to me. As you quite rightly point out, it may not be the best tool for the job. It’s just that I understand it better than the clone tool.

  27. DuhhUhh Says:

    Just found found this show through Meet the Gimp.
    Really love it.
    Quick question, if I play your vids in quicktime or frontrow on OSX I get audio but no video.
    Works fine in VLC.
    Not sure if anyone else has had this problem.
    I watch a lot of different videos in quicktime and all play fine except yours.
    I read that it’s encoded as H.264, which should work, but mabey I’m missing a codec of some kind.

  28. heathenx Says:

    Yeppers. The video is H.264 and the audio is mp3. Neither Richard nor I have a Mac of any kind so we have no idea what the people do on that team to get videos to play. Personally, I always had a little trouble playing our videos in Quicktime on Windows. VLC is fairly good at playing them but I prefer an MPlayer app of some kind. I would recommend MPlayer for OS X (http://mplayerosx.sourceforge.net).

    We encode video and audio with Mencoder which means that any MPlayer based player will play the files.

    Btw, We held a poll a few weeks ago regarding switching over to Quicktime/iTunes compatible MP4′s (take a look at our blog posts) but the majority wanted things the way they were…so no change.

  29. cloddo Says:

    Also with Perian installed Quicktime can’t dsplay the video… :(

  30. Richard Querin Says:


    I’m trying to figure out what formats Perian enables, but funny thing is that when I try to access their site (perian dot org) it closes my browser. I’ve tried this both in FF3 and in Epiphany, and it closes both.. hmm. strange.

    Anyway, it may just be that Perian doesn’t provide the required format to play our videos. I suggest using VLC or Mplayer for OSX as heathenx previously suggested.

    Sorry for all the trouble.

    Also note though that you can actually download the flash (.flv) file and play that locally too. I know that VLC can play flv files and likely QT can too. See heathenx’s comment on episode 062 to see how to do that. That may solve your problems too. Here is the comment:

  31. screencasters.heathenx.org » Blog Archive » Possible Grid Masking Photo project? Says:

    [...] this… I was thinking about using a similar grid mask to that used in Screencaster’s Episode 064. Essentially a grid of say, 9 rounded rectangles. I would take a nice image that I like and and do [...]

  32. screencasters.heathenx.org/blog » Blog Archive » Possible Grid Masking Photo Project? Says:

    [...] this… I was thinking about using a similar grid mask to that used in Screencaster’s Episode 064. Essentially a grid of say, 9 rounded rectangles. I would take a nice image that I like and and do [...]

  33. Simarilius Says:

    Nice post :D
    Good to see someone actually uses that Rows and Grids dialog. Coded it to scratch an itch, but wasnt sure anyone else was using it. Love the maple leaf image too.

  34. heathenx Says:


    You know those engineers…they gravitate to the most practical tools first. ;)

  35. Richard Querin Says:


    Glad you liked it. Like heathenx says, I find it more intuitive for this kind of thing that doing tiled clones. Makes more sense to me…

    Thanks so much for creating it!

  36. Simarilius Says:

    I created it cos I was trying to do contact sheets for pictures. If you drag and drop a whole folders worth of images onto an inkscape page then do rows/cols it will lay em out in a nice grid for you. It should be smart enough that if you drag em about to rearrange the order then reapply it will keep them in the new order.

  37. heathenx Says:

    That’s interesting. I’ll have to try that.

    Since the Rows and Columns dialog is dead simple (thanks for that) then we will hold you responsible for redesigning the Create Tiled Clones dialog…and we expect it by days end…so stop what you are doing and get ‘er done…the clock’s ticking. :)

  38. Don W. Says:

    I don’t seem to be able to drag and drop dotpng files to Inkscape 046. Am I doing something wrong. Import works ok.
    Good to see a developer on the site.

  39. Richard Querin Says:

    @Don – I have exactly and equivocally zero solutions for you. ;) It works fine here… on my XP box at work. Are you sure they’re not coming in very very very small or something weird like that? I guess being able to import them fine precludes that possibility though.

    @Simarilius – I did a contact sheet type of print for mothers day 2 or 3 years ago. Took about 20 photos of my daughter, did small b/w versions of them and produced a nice tiled print at 8×10. Unfortunately I wasn’t using Inkscape then and fumbled through it with Paintshop pro or something using a calculator. ;) The row/col method in Inkscape would have saved me literally a couple of hours likely.

  40. Simarilius Says:

    @Heathen – Not sure i’d dare mess with Bulias baby, ironically enough he was the one who helped me make the rows/cols one nice and friendly. Think the problem with the tile clones one is just that it can do so many things.

    @Don – No idea why that wouldnt be working I’m afraid, file a bug on it at the inkscape site with details of platform etc, hopefully we can work out whats going on.

  41. Don W. Says:

    @RQ-Sim–Thx for the help. I think I found the problem, now to find a way to correct it. In 045 it works
    (drag & drop) when you run NOT as admin. When you run AS admin it stops. 046 only seems to work right if run AS admin. If I remember the Perspective effect won’t work if (046) is run NOT as admin. I’ll do
    a little more searching and report back.
    BTW OS=Vista.

  42. Don W. Says:

    More Info (Vista)
    As suspected, the problem points back to VISTA. (dam M$). If User Account is activated drag & drop doesn’t work but perspective does, if User Account is not activated perspective doesn’t work but D&D does . I guess we (Vista users) have to pick our effects. 045 and 046 works well for both effects in XP-Pro. (dam M$).

  43. Simarilius Says:

    @Don – Interesting discovery, thanks for doing the digging. I’m probably the only dev masochistic enough to actually be on a Vista box, so will have a play when i get home. Cant promise I’ll fix it, but I’ll have a play :D

  44. Don W. Says:

    @Simarilius–Thanks, Another discovery. I un installed 046, reinstalled from same release but did NOT run as admin, both effects worked. Problem seems to only be the “Run as Administrator” option. On an earler release of 046 I could not get the perspective to work until I used the “Run as Administrator”. Maybe someone fixed it.
    Later, Don

  45. grid mask « Serenblip's Blog Says:

    [...] Richard Querin’s tutorial on masking out a bitmap image with objects in Inkscape is easy to follow and is very simple to do. The effect is really good. Here’s my attempt. [...]

Leave a Reply