invert colors misses some lines

Post questions on how to use or achieve an effect in Inkscape.
cpbl
Posts: 2
Joined: Fri Dec 09, 2011 12:10 am

invert colors misses some lines

Postby cpbl » Fri Dec 09, 2011 12:17 am

Hello. When I select all and then use Filter - Color- Invert (possibly after drawing a white rectangle behind everything, or before using Document Properties to set the bg to black) on the attached file, the borders of the four plots do not get treated: they are left black and therefore become invisible.

Am I doing something wrong?
Attachments
tmp.svgz
(10.53 KiB) Downloaded 139 times

cpbl
Posts: 2
Joined: Fri Dec 09, 2011 12:10 am

Re: invert colors misses some lines

Postby cpbl » Fri Dec 09, 2011 1:42 am

To clarify, my intent is to create an inverse-video of a black-and-white (or, more generally, a grayscale) figure. It would be nice to be able to do this easily with Inkscape and ultimately from the command line for a grayscale PDF.

Incidentally, the source of the four figures assembled here was matplotlib.

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

Re: invert colors misses some lines

Postby brynn » Fri Dec 09, 2011 7:48 am

Image
Welcome to InkscapeForum!

It's not just the 16 paths which make up the 4 borders that aren't changing to white. There are some little tick marks along each path, which are tiny paths too, which remain black.

It's gonna take someone else to figure out what's causing this problem. But I suspect it is a bug.

I have determined that if you take one node of all these 2 node paths (after applying the filter), and move it slightly off the vertical or horizontal, the path automatically changes to white. And I think the reason that the other paths, which are also completely vertical and horizontal, appear to have been filtered, is because they are already gray. After applying the filter, they remain the same color. So I think they are having the same problem. Because if I move one of their nodes slightly, after applying the filter, they become black.

I seem to recall some kind of bug where filters don't apply to perfectly horizontal or vertical lines. ....or something like that?? But I'm not familiar enough with grayscale images to suggest an alternative.

Oh, well there is one thing you could do that should work. The original borders that you're complaining about are not rectangles, they are 4, 2-node paths. If you combine those 4 paths (Path menu > Combine) and then join the nodes (3rd button from left on Node tool control bar), the filter will then affect them. But that won't solve the problem for the little tick marks. And if you want the gray lines inverted as well, it won't solve that either.

Actually, I can think of a way to make it work with the gray lines. But I think better to wait for someone else to reply. Other than making the background black, and changing the colors of all the elements "manually" (i.e. - not using a filter) I'm not sure what else you might do. I think there may be another way to make it grayscale. I just don't remember what it is.

And I'm pretty sure someone else will have a better solution :D


Return to “Help with using Inkscape”