the export in pixels changes the dimension?

General discussions about Inkscape.
royer11
Posts: 3
Joined: Thu Jan 17, 2019 11:58 am

the export in pixels changes the dimension?

Postby royer11 » Thu Jan 17, 2019 12:32 pm

Hello everyone, when I use the following tool:
Filters /Pixel Tools / Pixellize
When pixelated, it automatically changes the resolution of the image. For example:
I have a 64x64 resolution graphic, now I use the pixellize extension and when I export the image to the same resolution 64x64, it exports me in the same resolution but with blank spaces and in the middle the image.
Image
Configure
Image
now I make the selection of the drawing
Image
once selected, I have used this tool and you can appreciate the configuration
Image
and here is my result, good export comes with a transparent outline and in its center is the graph.
What I want is for the drawing to occupy the whole image.
Image
Attachments
example.svg
example file
(12.46 KiB) Downloaded 157 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: the export in pixels changes the dimension?

Postby Lazur » Thu Jan 17, 2019 4:57 pm

Hi.

A working solution was posted here.

royer11
Posts: 3
Joined: Thu Jan 17, 2019 11:58 am

Re: the export in pixels changes the dimension?

Postby royer11 » Fri Jan 18, 2019 3:39 am

Lazur wrote:Hi.

A working solution was posted here.

Apart from that solution there is no other ?, well apparently I have redimenzionar the document and it makes me complex when you have drawings of different sizes

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: the export in pixels changes the dimension?

Postby Lazur » Fri Jan 18, 2019 8:40 am

royer11 wrote:Apart from that solution there is no other ?



There are always multiple solutions to skin the cat. The suggested one seemed most fitting to your image.

The other option was grouping all the filtered objects together, drawing a rectangle of the same size you want to export, and use that for clipping the group. Then export the clipped group (and preferably use visual bounding box for this approach.)
Here is the related part of the manual:
clipping.

This again, should work but probably there is a more fitting option.

Like, you could try opening the filter editor once the filter is applied. Select it from the left list of the filters used in the panel, and at the bottom at the filter general settings set coordinate to 0,0 and scale value to 1;1.
That should restrict the filtered area to the object's original bounding box.

Then again that pixellize filter can also be modified in the dropdown list as a brute-force solution by overwriting the related file in the inkscape folder.

Yet probably you could just switch off anti-aliasing in your document in the file's preferences (Shift+Ctrl+D).
That should add render="crispEdges" to the document as a general style element and then it's up to the renderer.
Theoretically that should do the job however some still remains from anti-aliasing inside inkscape. Using a browser to render such an alias svg is crisp and clean/"spiky".

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

Re: the export in pixels changes the dimension?

Postby brynn » Fri Jan 18, 2019 10:06 am

After your last response in this topic: https://forum.inkscapecommunity.com/ind ... pic=1503.0, I posted another possible solution.

royer11
Posts: 3
Joined: Thu Jan 17, 2019 11:58 am

Re: the export in pixels changes the dimension?

Postby royer11 » Sat Jan 19, 2019 4:11 am

Lazur wrote:
Then again that pixellize filter can also be modified in the dropdown list as a brute-force solution by overwriting the related file in the inkscape folder.
Yet probably you could just switch off anti-aliasing in your document in the file's preferences (Shift+Ctrl+D).

Hello Lazur, your idea interested me, could you please light me with your light, how do I make that configuration? "I'm referring to the configuration folder."
Image
Image

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: the export in pixels changes the dimension?

Postby Lazur » Sat Jan 19, 2019 10:48 am

Hi.

That seems right. However that affects only the selected filter. You have multiple filter definitions in your file doing the same thing.
Probably would be easier to remove all filters from the list, selecting all the objects and applying the pixellize filter to them all at once.
Exactly as you had in your attached svg. Then by editing that filter's general settings, you could affect all its appearances.

Made a quick video capturing the filter editing and how switching off anti-aliasing was supposed to be done with the properties panel (Shift+Ctrl+D) -although the latter doesn't really work, does it? (Rendered with a browser looks perfect though).

video

Then, as a bonus added a rectangle with a blur filter, demonstrating how the filter is restricted to an area defined by those values.
As the smudged effect is chopped off, the visuals are ending up with a sharp edge. Likewise a filtered area just as large as the visual bounding box would mostly produce somekind of visual issues on most of the built-in filters. Guess that's the reason why the pixellize filter's general settings are set as the rest default values.

To finish it, grouped the objects together and added clipping as mentioned above.



All in all it's a bit of unexpected behavior that switching off anti-aliasing doesn't work, nor switching to geometric bounding box with the filered object's export. Maybe it's worth a bug report or two.


Return to “General Discussions”