Automatic Cut Out Drawing

Post questions on how to use or achieve an effect in Inkscape.
linkBetweenInk
Posts: 6
Joined: Mon Dec 01, 2014 4:23 am

Automatic Cut Out Drawing

Postby linkBetweenInk » Mon Dec 01, 2014 4:43 am

Hi, I am new to both Inkscape and these forums. I need to figure out how "cut out" my objects from my drawing.

For example, if I draw a circle, I only want that circle and everything inside it to be what I save when I am done with the image. So, right now I am making a character for my game, and when I load the image into my game, it is the character on the paper running around.

(A) Is there an automatic way to do this instead of manually cutting it out? (B) What are these terms called so I can search for them? :?:

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

Re: Automatic Cut Out Drawing

Postby Lazur » Mon Dec 01, 2014 4:58 am

Welcome aboard!

You can use clipping or masking. Though for the output you would need a manually cut solution.
Cannot tell. What format the game engine needs?

linkBetweenInk
Posts: 6
Joined: Mon Dec 01, 2014 4:23 am

Re: Automatic Cut Out Drawing

Postby linkBetweenInk » Mon Dec 01, 2014 5:29 am

Thanks, I just started working with Love2d. I think it just accepts these:

https://love2d.org/wiki/ImageFormat

Why.. What do you have in mind?

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

Re: Automatic Cut Out Drawing

Postby Lazur » Mon Dec 01, 2014 5:53 am

A-ha!

I thought you wanted to work straight with vectors, like with synfig.
Though I haven't tried it yet, I'm guessing that could be a problematic solution to have there.

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

Re: Automatic Cut Out Drawing

Postby Xav » Mon Dec 01, 2014 5:44 pm

It sounds like you probably need the most commonly repeated answer on the forum (why this isn't a sticky yet, I don't know!):

Export your PNG files using File > Export Bitmap... NOT by using File > Save As... > Cairo PNG.

The former preserves transparency, whereas the latter flattens your image against a white background.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

linkBetweenInk
Posts: 6
Joined: Mon Dec 01, 2014 4:23 am

Re: Automatic Cut Out Drawing

Postby linkBetweenInk » Tue Dec 02, 2014 3:02 am

Xav wrote:It sounds like you probably need the most commonly repeated answer on the forum (why this isn't a sticky yet, I don't know!):

Export your PNG files using File > Export Bitmap... NOT by using File > Save As... > Cairo PNG.

The former preserves transparency, whereas the latter flattens your image against a white background.


Is there a way to unflatten the latter. My object is now basically stuck to the background canvas, so when I move it around, it is moving around the picture as well as the background.

Also, I am not sure how to duplicate this problem. Yesterday, I saved as a PNG and exported as bitmap just fine. But,today the problem has occurred. I did have one prompt where it asked me to embed or link. Not sure whether that had something to do with it.
Last edited by linkBetweenInk on Tue Dec 02, 2014 3:20 am, edited 1 time in total.

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

Re: Automatic Cut Out Drawing

Postby Xav » Tue Dec 02, 2014 3:17 am

If you've drawn your object in a new file, with no background, then Export Bitmap should give you a transparent PNG. If you've drawn the background as well, you may need to show and hide layers, or use "export selected" in the dialog to export each part separately.

Otherwise I'm confused as to what you want. Can you supply an example file, the output from it, and a description of what you want to get instead?
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

linkBetweenInk
Posts: 6
Joined: Mon Dec 01, 2014 4:23 am

Re: Automatic Cut Out Drawing

Postby linkBetweenInk » Tue Dec 02, 2014 3:34 am

Xav wrote:If you've drawn your object in a new file, with no background, then Export Bitmap should give you a transparent PNG. If you've drawn the background as well, you may need to show and hide layers, or use "export selected" in the dialog to export each part separately.

Otherwise I'm confused as to what you want. Can you supply an example file, the output from it, and a description of what you want to get instead?


Well, I have solved the original issue. But, the problem now is that I want to isolate why my drawing is "stuck" to my canvas. For example, you have a paper circle and you glue it to a white piece of paper. So, they are now basically one object instead of 2. (I am not sure whether the canvas is considered an object)

Here is the file.

P.S. Right now, I (A) saved as a PNG, then (B) Exported to Bitmap, and (C) I am now trying to close the inkscape window and it is giving me the following:

The "floor.png" was saved with a format (org.inkscape.output.svg.inkscape) that may cause data loss!

And it gives me the options:
Close without saving
Cancel
Save as SVG

Could this be the possible culprit?
Attachments
floor.svg
(23.48 KiB) Downloaded 161 times

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Automatic Cut Out Drawing

Postby tylerdurden » Tue Dec 02, 2014 11:23 am

Ja, all you have in there is an embedded bitmap.

It is recommended practice to work in in Inkscape svg format, save that as a construction/working file and export or save-copy-as in other formats for distribution/publication. (Unless the destination is svg compatible.)
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Automatic Cut Out Drawing

Postby tylerdurden » Tue Dec 02, 2014 11:24 am

PS

As you can see, SVG can contain bitmap data, as well as vector data.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

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

Re: Automatic Cut Out Drawing

Postby Xav » Tue Dec 02, 2014 5:21 pm

I would suggest you start again from the beginning. Draw your image and save as Inkscape SVG format. Do *not* save as PNG.

The Inkscape SVG format file is your "master" which contains all the parts in an editable form that Inkscape can understand. Now to create the PNG file for Love2d use File > Export Bitmap.

If you subsequently need to make any edits you should open the SVG file and make them there, then save the SVG and also re-export the PNG file.

I would also recommend resizing the canvas to suit your drawing. Once you've created the drawing do the following:

1) Go to File > Document Properties
2) Click on Resize page to content... to show the hidden margins and button.
3) Click on the Resize page to drawing or selection button to resize the canvas.
4) Save your SVG file.

Now when exporting the PNG file you can use the Page button at the top of the dialog to export a correctly sized image.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

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

Re: Automatic Cut Out Drawing

Postby brynn » Wed Dec 03, 2014 2:23 pm

...most commonly repeated answer on the forum (why this isn't a sticky yet, I don't know!):


Like many other issues in this forum, it's because no one who participates regularly has the proper access or permissions.

I think I did put it in the forums' faq, which is sticky, long time ago. viewtopic.php?f=5&t=2037 Although you have to open and read a PDF to find it. I also submitted a list of items that I thought should go in the forum's faq, long time ago, with no luck. And I just put it in a proposed new faq for inkscape.org, but it's not posted to the site yet. (I could put it in the current faq, except the new one should be going up soon after 0.91 is released. But still could p ut in, if you like, just lmk) :D


Return to “Help with using Inkscape”