Bitmap just one Layer?

Post questions on how to use or achieve an effect in Inkscape.
Mr. T
Posts: 6
Joined: Tue Sep 06, 2011 7:20 pm

Bitmap just one Layer?

Postby Mr. T » Tue Sep 06, 2011 7:26 pm

hey guys,
sorry bothering you with that message but i did not find an answer somewhere.

i am editing PDF files for anonymisation issues. for that reason i am adding a black rectangel over the eyes for example. when i save this file again as a PDF this rectangle can be easy removed. so i tried to work around an export it as bitmap. as far it looks like this solves my issue since i dont see different layers any more. but since it is an important topic i wanted to ensure i am right.

would be great if someone can give me an answere - thx!

oh and just one more thing, is there a difference if i export as bitmap or save as *.png?

really appreciate your help, thanks!

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

Re: Bitmap just one Layer?

Postby brynn » Tue Sep 06, 2011 9:46 pm

Welcome to InkscapeForum!

Yes, there is a difference between Export Bitmap and Save As Cairo PNG! The proper way to get a PNG version of and Inkscape SVG image is Export Bitmap. If you use the other, you will lose any transparency. And there are other differences as well, but I don't understand what they are :oops: So unfortunately I can't explain any further.

I don't understand the first part of your message though. Is the original image in some raster format. It sounds like a photo, and I would guess JPG. When you import the JPG, and draw black rectangles, you're not actually editing the photo. Really you're just drawing black rectangles over the photo. If you use Export Bitmap to get a PNG version, then you won't be able to remove the rectangles outside of a graphics editor.

But you're talking about PDFs where the problem happens. Have you imported a photo into Inkscape, drawn rectangles, and then Save As PDF? And are you saying that when you open it in Adobe Reader, you can move the rectangles? That doesn't sound right, but I have to try it.....

Ok, I did successfully save a PDF as you've described. But opening in Adobe Reader, I can't find any way to even select mine. Actually I drew a red ellipse. But I can't figure out any way to remove it. Possibly if someone has Adobe Acrobat, they could select and delete it. And of course if you open it in Inkscape, you would still be able to move it or delete it, or whatever.

You'd probably be better off using a raster graphics editor, where you can actually edit the photo itself, if you want permanent results.

Mr. T
Posts: 6
Joined: Tue Sep 06, 2011 7:20 pm

Re: Bitmap just one Layer?

Postby Mr. T » Tue Sep 06, 2011 9:56 pm

hey, thanks for your fast reply and the nice welcoming :)

i will try it again :)
i am having a PDF document with patient information, strings as well as pictures in it. this i am opening in Inkscape.
i have to get rid of all the information identifying a person. removing parts of the string is no problem at all and i am pretty sure it is impossible to get them back after i removed them. but as you said adding some rectangle (over the eyes for example) did not satisfy my need since the PDF can be edited later again (with Inkscape for example). i guess you are talking about acrobat reader which of course can not edit the file since it is just a reader but after opening the edited PDF (rectangle over the eyes) in Inkscape you can delete it an see the eyes.

so PDF to PDF can not be the perfect solution for me so i figured out the option to export as bitmap. now my question was if this bitmap now is ensuring that the rectangel can not be removed. but since you said
If you use Export Bitmap to get a PNG version, then you won't be able to remove the rectangles outside of a graphics editor.
i guess that means it is possible to undo the anonymisation?

sorry for being a little unclear in the beginning.

thank you very much for your help!

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

Re: Bitmap just one Layer?

Postby brynn » Tue Sep 06, 2011 10:39 pm

i guess that means it is possible to undo the anonymisation?

Well I thought they might be able to be removed in a graphics editor. And they can. But according to the test I did just now, if you apply the black rectangles and export to PNG, then open in The GIMP, if I remove the black rectangles, I leave a hole in the photo.

Now Inkscape.....if you imported the new PNG back into Inkscape....no, the black rectangles would be part of the photo, and therefore permanent. So I guess PNG is your answer! But you could still do it in a raster graphics program (like The GIMP) to begin with, and save yourself a step.

Mr. T
Posts: 6
Joined: Tue Sep 06, 2011 7:20 pm

Re: Bitmap just one Layer?

Postby Mr. T » Tue Sep 06, 2011 10:57 pm

damn, i have to find a way to anonymiz it. it does not help me if it can be revoked with any other problem.
but i dont really get how it is possible since png is also just saving one layer isnt it?!

but you said gimp leaves you an white hole? so maybe it is just one layer and since you remove the rectangle there is nothing more below - so it would work for me?

can you really mark the rectangle, like as a standalone object (posting.php?mode=reply&f=5&t=10201#)or are you marking it somehow special? (i hope you get what i mean :))

thanks!

Mr. T
Posts: 6
Joined: Tue Sep 06, 2011 7:20 pm

Re: Bitmap just one Layer?

Postby Mr. T » Tue Sep 06, 2011 11:39 pm

hmm i just installed gimp to try it there but how do you get layers there? i made an example, exported it as svg as well as png but never see layers :/

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

Re: Bitmap just one Layer?

Postby Xav » Wed Sep 07, 2011 8:30 pm

Mr. T wrote:damn, i have to find a way to anonymiz it. it does not help me if it can be revoked with any other problem.
but i dont really get how it is possible since png is also just saving one layer isnt it?!


Yes, saving as PNG will give you a flattened version of the Inkscape document - i.e. just one layer.

Mr. T wrote:but you said gimp leaves you an white hole? so maybe it is just one layer and since you remove the rectangle there is nothing more below - so it would work for me?


I believe that what Brynn meant is that removing the rectangle in The Gimp will leave a transparent hole, or perhaps a "hole" showing the background colour (depends on the layer settings in The Gimp) - but definitely not the eyes that you're trying to hide.


So, in short, saving as a PNG should do what you want.
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: Bitmap just one Layer?

Postby brynn » Fri Sep 09, 2011 5:46 am

Yes, that's what I was trying to say. Saving as PNG will do what you want.

I only mentioned GIMP because it's the only raster graphics program that I happen to have, that I could test the PNG with. But it works to save as PNG with Inkscape.

But you realize that Inkscape is a vector graphics editor, right? A raster grahics editor such as The GIMP will do the job too.

Mr. T
Posts: 6
Joined: Tue Sep 06, 2011 7:20 pm

Re: Bitmap just one Layer?

Postby Mr. T » Fri Sep 09, 2011 7:22 pm

thanks for your replies!

yes i know that, but as i mentioned i need it to edit PDF file and Inkscape was the only good open source tool i found.
or do you may know an other one? i just see with gimp it is possible as well to edit pdf files but they are handled like pictures, so it is for example not possible to really select parts of a text.

just one more thing, is it now i difference if i save it as png or export it as bitmap? since both files get the extension .png - only the save as way does not show me the images. so i would prefer the export as bitmap way, no differnce isnt it?

really appreciate your time and help! cheers

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

Re: Bitmap just one Layer?

Postby brynn » Fri Sep 09, 2011 10:37 pm

I'm so confused!

You can import a PDF with Inkscape. It might or might not handle text correctly. But if all you want to do is put black rectangles over it, it wouldn't matter whether you can edit the text or not. Or am I still confused? Do you need to actually edit the text?

I see that I mispoke in my last message, and used the term "save as PNG". That is not technically correct. You definitely need to use Export Bitmap to create your PNGs. Do not use Save As Cairo PNG. What I meant when I said "save as PNG" was as opposed to saving as PDF. But here's the technically correct answer:

Import the PDF, do your editing, then use File menu > Export Bitmap to create a PNG version. Once you have exported the PNG, you will not be able to retrieve the text or image covered by the black rectangles. If you need to edit the text, I think you will be able to do so. And after you export to PNG, the original will be irretrievable.

Mr. T
Posts: 6
Joined: Tue Sep 06, 2011 7:20 pm

Re: Bitmap just one Layer?

Postby Mr. T » Sat Sep 10, 2011 12:02 am

thanks, now everything is clear!

about your confusion:
ideally the pdf should be exported as pdf again. but this is just possible if no rectangles are used for anonymisation. so in cases there are just some names and other (text) values who have to be removed it is good that inkscape can do that and export pdf again. in the other case (Where rectangles are used) i will have to export it as bitmap since the export as pdf would not satisfy the anonymisation (the rectangles could be removed afterwards again)

hope it is clear now - sorry :)

thanks and have a nice day!


Return to “Help with using Inkscape”