Copy-paste small section of imported bitmap?

Post questions on how to use or achieve an effect in Inkscape.
RubenGeert
Posts: 24
Joined: Thu May 16, 2013 10:23 pm

Copy-paste small section of imported bitmap?

Postby RubenGeert » Fri May 24, 2013 1:49 am

Dear all,

I imported this bitmap but I'd like to make the letters "Data" disappear because they're too close to my text balloon. I thought about copy-pasting a section of the blue gradient of the bitmap over it.
Image

I could copy-paste the entire bitmap and reduce it to the needed rectangle but that seems a bit clumsy to me. Isn't it possible to copy-paste just the small section I need in any way?

I know Inkscape isn't the program of choice for this but I need only a handful of such modifications so I thought I'd give it a try...

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Copy-paste small section of imported bitmap?

Postby hulf2012 » Fri May 24, 2013 4:56 am

Hello:
I always do this trick:
1.- Make a screenshoot
2.- Paste in Inkscape
3.- Select the box of the image
3.- Go to menu->edit: "Make a Bitmap Copy" (Alt+ B)
4.- Now you work on the the bitmap copy(first copy). Put the original aside
5.- You can duplicate the copied(sic?) bitmap (second copy) (Ctrl + D)
6.- Now draw a rectangle with the size of the area that you want to extract
7.- Align the rectangle with the area of second copy that you want to extract
8.- Select both (rectangle and image)
9.- Clip: menu->object->clip:set
10.- the second copy is cliped
11.- Again, make a bitmap copy of the clipped second copy
12.- Now you have what you needed: the extracted area

Now you can align your first copy with the extracted area. You can scale the extracted area to 'erase' the area that you want.
If you want, you can remove all the objects that aren't necesary.

Greetings
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

RubenGeert
Posts: 24
Joined: Thu May 16, 2013 10:23 pm

Re: Copy-paste small section of imported bitmap?

Postby RubenGeert » Fri May 24, 2013 9:47 pm

Thanks all for the suggestions!

There's too little space to move the balloon to the right. I feel that the width of a single letter is about the right amount of horizontal space between the text and the balloon border.

And yes, I know I should use GIMP or Photoshop or Paint.net for this kind of stuff but I'm completely unfamiliar with all such image editors...

However, I'm very happy with the results I'm currently getting from Inkscape!

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

Re: Copy-paste small section of imported bitmap?

Postby druban » Sat May 25, 2013 8:22 am

Hi Ruben. I have to say that PT's advice is the soundest and you will reap huge benefits from just a brief foray into the GIMP, where the clone tool will make incredibly short work of your problem. But if you are very determined to do it in Inkscape, here's how...

Select that little rectangle that you have drawn over the area you want to duplicate. Give it no stroke and no fill but keep it selected. Call the export PNG dialog and choose the selection option. Use a higher resolution than the default if you want particularly smooth effects but your original is screen res so you might as well stay with the default, and save the bitmap to your disk. You will then have to import it and position it carefully before scaling/duplicating it however many times you need. Depending on how carefully you aligned things with Inkscape's internal pixel grid you will get fuzzy or sharp results, if that matters.
The advantage of this method over clipping/masking is that the bitmap you are using is actually the size of the area visible, and has a correspondingly smaller size impact on your file. In development versions of Inkscape there is a crop extension that trims a bitmap to the correct dimensions so of course for future reference this functionality should make the workaround detailed here unnecessary.

image3178.png
image3178.png (127.49 KiB) Viewed 2301 times
repair.svg
(109.84 KiB) Downloaded 159 times


BTW I used five Bitmaps because your screenshot had the black stroked rectangle in it but of course you would only need three, the middle one stretched and the side ones to cover up the transparency problem... :D
Your mind is what you think it is.


Return to “Help with using Inkscape”