Pixelize Filter or Effect?

Post questions on how to use or achieve an effect in Inkscape.
DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Pixelize Filter or Effect?

Postby DavidBrennan » Fri Mar 30, 2012 4:06 pm

In Gimp, there is a simple Filter which allows you to make images look like they're, well, pixelated (under Filters > Blur > Pixelize). Is there a similar Pixelate function for Inkscape? I was sifting through the Filters and found some vaguely similar ones, but definitely nothing that's a precise match.

Here's an instance of it done in Gimp:

Image

User avatar
druban
Posts: 1599
Joined: Fri Nov 20, 2009 10:48 pm

Re: Pixelize Filter or Effect?

Postby druban » Fri Mar 30, 2012 5:58 pm

Under the edit menu there is a command, "Make bitmap copy'. To use this to get the effect you want, you must make a copy of the object(s) you want pixelised scale it down or up appropriately and then use this command. The bitmap copy will be made the same size as the screen size of the object. You can then resize it and it will show more or less pixelization.
in the accompanying example, I made a bitmap copy of vector copies of the letter C thad had been scaled down in varying amounts. I then resized all the bitmap copies to be the same size as the original (I used the paste size command).
pixelize.png
pixelize.png (16.61 KiB) Viewed 13528 times
I hope this is what you need.

Later edit: I noticed after posting that one of the tiny vector copies was not deleted and can be seen just hanging out with the others, trying to look nonchalant...
Your mind is what you think it is.

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Fri Mar 30, 2012 6:07 pm

Thanks, druban.

I was hoping to find a way of doing it with the scalable .SVG graphic itself rather than using bitmaps, but if that's the only option available, it's definitely a viable Plan B. Thanks.

User avatar
druban
Posts: 1599
Joined: Fri Nov 20, 2009 10:48 pm

Re: Pixelize Filter or Effect?

Postby druban » Fri Mar 30, 2012 6:40 pm

Well, you can end up with SVG, but you have to go through a bitmap stage or two. Say you want the pixel size of one of the bitmap versions that you make. You can use trace bitmap to go back to SVG, but if you try tracing that tiny bitmap (its actual pixel dimension is very small, even if it is scaled up on canvas) you will get nothing resembling pixels. The solution is to scale that small bitmap up until it's quite large and then do a 'make bitmap copy'! The result will look identical except when you look down in the status bar, you will see that the dimensions of this new image are much greater. Now you can succesfully do a trace bitmap. I recommend you turn off all smoothing and pick the colors option with about 5 or 6.Also enable the stack scans and remove background options.
Here is an example of the results - these are purely vector, scaleable and editable.
g3364.png
g3364.png (8.61 KiB) Viewed 13522 times

I have attached the file as well.
pixeliseand revector.svg
(56.36 KiB) Downloaded 236 times

For both groups after tracing I entered the group, selected all, gave them a colour and reduced the opacity to 50. I liked this effect better than the colours trace bitmap assigned.
Your mind is what you think it is.

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Fri Mar 30, 2012 6:57 pm

That's very industrious and resourceful. Thanks a lot!

I'd mark this thread as "Solved", but I guess that that's not an option here. Still, you did essentially solve it, so thanks. (Although it would be nice to have a Filter for it, still.)

User avatar
druban
Posts: 1599
Joined: Fri Nov 20, 2009 10:48 pm

Re: Pixelize Filter or Effect?

Postby druban » Fri Mar 30, 2012 7:08 pm

DavidBrennan wrote:That's very industrious and resourceful. Thanks a lot!

You're welcome! It was not much work, and it seems like the kind of thing that other people might find useful sometime...

DavidBrennan wrote:Although it would be nice to have a Filter for it, still.

Well, you could apply the pixellise[sic] filter to a vector object and then go to filter effects and edit the convolution matrix to make a customized filter. If you are into that sort of thing. There are a couple of developers that are amazing at what they can do with matrices, but I don't have the expertise for it... Besides I do like pure vector although I guess that's an idiosyncrasy.
Your mind is what you think it is.

User avatar
Xav
Posts: 1107
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Pixelize Filter or Effect?

Postby Xav » Fri Mar 30, 2012 8:45 pm

Another approach, depending on what collection of SVG objects you want to end up with, would be to use the Trace option in the Tiled Clones dialogue:

http://tavmjong.free.fr/INKSCAPE/MANUAL ... Trace.html
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Pixelize Filter or Effect?

Postby llogg » Sat Mar 31, 2012 1:08 am

Xav, that's just the approach I was going to suggest.

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Sat Mar 31, 2012 7:32 am

llogg wrote:Xav, that's just the approach I was going to suggest.

Can either of you provide step-by-step instructions (when you get the time, this is for fun and not urgent at all)?

I've been messing around with it by:

-Creating a generic square
-Having a simple bitmap beneath it
-Going to Edit > Clones > Create Tiled Clones
-Messing around with the "Create Tiled Clones" settings, particularly in the "Trace" tab

But I've been unable to get the cloned squares to copy the visuals of the Bitmap beneath them at all. I must be missing something critical.

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Pixelize Filter or Effect?

Postby llogg » Sat Mar 31, 2012 10:14 am

Are you trying to start with a bitmap image or with a vector?

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Sat Mar 31, 2012 10:17 am

With a Bitmap image.

User avatar
brynn
Posts: 9905
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Pixelize Filter or Effect?

Postby brynn » Sat Mar 31, 2012 11:46 am

On top of all that, there actually IS a Pixelate filter! You can find it at Open Clipart Library in the gallery of "ivan_louette" (who created it).

Oops, llogg and I posted simultaneously.

Edit
Link to OCL: http://www.openclipart.org/

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Pixelize Filter or Effect?

Postby llogg » Sat Mar 31, 2012 11:46 am

You had it right, but you probably missed a key thing about using the Trace function with tiled clones. The color output will only apply if the tile you are cloning has a Fill of Unset.
Image
1. Bring the bitmap into Inkscape.
2. Make your pixelating tile. I used a square. Set the fill to unset.
3. Line up your tile over the top right of the bitmap.
4. Select the tile. Edit>Create tiled clones>Trace. Click Trace drawing under the tiles, Pick from the drawing color, Apply value to the clone's color. Set the width and height to the dimensions of your bitmap.

Size of your tile is basically the resolution of your pixelation. I would have used a smaller square tile, but it's a little too resource intensive for my gear.

If you get little gaps between your pixelation tiles, you can get rid of them by selecting the base tile, converting to path (if it wasn't a path already) and doing Path>Outset once.

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Sat Mar 31, 2012 11:55 am

When you say that the fill for the tile has to be "Unset", is that the same as "No fill"? (Just empty and transparent, basically.)

Because, when I set it to "No fill", it always remains transparent. (Although I'm still tinkering away.)

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Sat Mar 31, 2012 12:18 pm

Brynn,

Thanks for the reference to ivan_louette's Pixelate Filter. I believe I've located it (well, there are links to many filters there, plus a Pixelate .SVG, so between them, I'm sure I can find it).

Is there a tutorial for how to install these filters? Ivan has some description at the page:

These filters are all included in Filters alternate 7, thus you should avoid to place this file in your Filters directory. The goal of this file is to show the settings of the new image blending filters. Only apply them to images, open the Filters Editor, click on the "Image" primitives in the filter tree, and browse your images directories to select the image you want to blend. Take care that some filters like "Garden of Delights" and "Tartan bicolor" have two images primitives, which allow to blend three pictures.


....But I don't really know what that means. I'm a relative novice with Inkscape, obviously, and not as programming savvy as many of the users here seem to be.

User avatar
brynn
Posts: 9905
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Pixelize Filter or Effect?

Postby brynn » Sat Mar 31, 2012 1:23 pm

I don't understand entirely what that means either. I would just get the Pixelate.SVG. It's a regular SVG file. Once you open it in Inkscape, open the Filters Editor. Also open your image file (Batman logo). Select the logo, and in the Filters Editor, place checkmark beside Pixelate. That should apply the filter to the logo.

If that doesn't work, let us know. Maybe ivan will reply with clarification. Or of course, you have the other 2 techniques offered.

(I really just happened to see that filter the other day, or I would not have known about it. Another member recently asked how to install filters, so I knew ivan had some at OCL. I concluded that I don't think there are any installation instructions for filters. But if there are, I would love to know :D)

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Sat Mar 31, 2012 1:25 pm

Thanks for the process, Brynn. I'll get to work on that in just a few minutes.

User avatar
druban
Posts: 1599
Joined: Fri Nov 20, 2009 10:48 pm

Re: Pixelize Filter or Effect?

Postby druban » Sat Mar 31, 2012 6:52 pm

DavidBrennan wrote:When you say that the fill for the tile has to be "Unset", is that the same as "No fill"? (Just empty and transparent, basically.)

Because, when I set it to "No fill", it always remains transparent. (Although I'm still tinkering away.)

The unset option is not the same as no fill. In the fill and stroke dialog the 'unset opion is the question mark, and the 'no fill /no stroke' option is the X. You can also unset the fill by right clicking on the bottom left corner swatch without opening the F/S dialog.
Your mind is what you think it is.

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Pixelize Filter or Effect?

Postby llogg » Sat Mar 31, 2012 8:39 pm

DavidBrennan wrote:When you say that the fill for the tile has to be "Unset", is that the same as "No fill"? (Just empty and transparent, basically.)

Because, when I set it to "No fill", it always remains transparent. (Although I'm still tinkering away.)
Look at the bottom left of my screen capture. I have the tile selected and it says Fill: Unset, Stroke: Unset. I don't think the stroke actually matters, but the fill is important. Like Druban said, you can right click the Fill area in the bottom left and select Unset.

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Sun Apr 01, 2012 8:40 am

druban wrote:The unset option is not the same as no fill. In the fill and stroke dialog the 'unset opion is the question mark, and the 'no fill /no stroke' option is the X. You can also unset the fill by right clicking on the bottom left corner swatch without opening the F/S dialog.

(Emphasis added.)

Thanks, druban. Right-clicking and then just selecting "Unset Fill" was exactly what I did and it worked.

So everything is looking great! There is one lingering little issue, though (and I have a hunch that this is unavoidable). There's always a tiny gap between the Cloned Tiles. My settings have both the Shift and the Scale set to Exponents of 1.00.

Image

(I was also just thinking of how ironic it is that probably one of the biggest purposes of vector graphics is to AVOID pixelization, and yet here's all this effort to generate pixelization. So I guess this is kind of like figuring out how to strap a bunch of pull horses to the front of a car. It is also slightly redundant, in a sense, because obviously a bitmap that's pixelated can scale up without evidence of it. But it's still cool to know this.)

User avatar
druban
Posts: 1599
Joined: Fri Nov 20, 2009 10:48 pm

Re: Pixelize Filter or Effect?

Postby druban » Sun Apr 01, 2012 9:51 am

DavidBrennan wrote:There's always a tiny gap between the Cloned Tiles.

as mentioned above, by Llogg, you can fix this by selecting your ORIGINAL rectangle/square what have you and scaling up slightly, this should make all the clones just that tiny bit larger but not move them so the gap will vanish. Use the transform dialog to get a really precise scale factor.
DavidBrennan wrote:It is also slightly redundant, in a sense, because obviously a bitmap that's pixelated can scale up without evidence of it.

Yes but you can rotate a pixelised vector! You can also perspectivize it or warp it in ways that just can't be done with a bitmap without serious jaggedness and deterioration or having to use very high resolution and the cocomitant performance and storage hit.
Your mind is what you think it is.

DavidBrennan
Posts: 41
Joined: Thu Jan 19, 2012 10:33 pm

Re: Pixelize Filter or Effect?

Postby DavidBrennan » Sun Apr 01, 2012 10:04 am

Thanks, durban. That seemed to fix the gap issue.

(For any future lurkers using these processes, the original box which was cloned is actually hidden behind one of its Clones. So you have to use the Alt + Left Click on the Clone to access the original underneath it.)


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: Google [Bot] and 6 guests