Page 1 of 1

[Solved] Delete the part outside a selected area

Posted: Wed Oct 18, 2017 3:40 pm
by david7365
"Trimming" means to select a desired area of a drawing or image and delete the part of the drawing or image that is outside the selected area.

How is this done in OpenOffice? The Help is not helpful.

Re: How to trim?

Posted: Wed Oct 18, 2017 9:15 pm
by acknak
Sorry, this isn't possible in the general case.

What are you trying to do, exactly? There may be a workaround or alternative approach to get a useful result.

Re: How to trim?

Posted: Wed Oct 18, 2017 9:28 pm
by david7365
Well, it is too late now, but what I was trying to do was to take a screenshot of an email (it shows a bug in a product) and blank out sensitive information (the name and email address of a customer). So, first step was to trim out some stuff at the bottom that was irrelevant to the screenshot, and for this I looked for a Trim operation, such as is found in other image-manipulation programs. You have told me there is no such operation.

My next step was to be blanking out the sensitive information. For that, I ended up using gray rectangles in MS Paint. I would have preferred pixilation, but I'll bet that OpenOffice doesn't support pixilation.

I really have to reset my expectations. Just because a drawing program supports layers doesn't mean it's really easy to use, I guess.

Re: How to trim?

Posted: Wed Oct 18, 2017 10:17 pm
by MrProgrammer
david7365 wrote:… such as is found in other image-manipulation programs.
Draw is not an image-manipulation program. Read the introduction in the Draw Guide.
Draw Guide wrote:Draw is a vector graphics drawing tool, although it can also perform some operations on raster graphics (pixels). Using Draw, you can quickly create a wide variety of graphical images. Vector graphics store and display a picture as simple geometric elements such as lines, circles, and polygons rather than as a collection of pixels (points on the screen).
If you need an image-manipulation program, use GIMP.

Re: How to trim?

Posted: Wed Oct 18, 2017 10:21 pm
by david7365
Sorry, I only use Gimp if I must. So user unfriendly. But I get your point that Draw is best for vector graphics. Screenshots are bitmaps.

Re: How to trim?

Posted: Wed Oct 18, 2017 11:02 pm
by keme
david7365 wrote:Well, it is too late now, but what I was trying to do was to take a screenshot of an email (it shows a bug in a product) and blank out sensitive information (the name and email address of a customer). So, first step was to trim out some stuff at the bottom that was irrelevant to the screenshot, and for this I looked for a Trim operation, such as is found in other image-manipulation programs. You have told me there is no such operation.

My next step was to be blanking out the sensitive information. For that, I ended up using gray rectangles in MS Paint. I would have preferred pixilation, but I'll bet that OpenOffice doesn't support pixilation.

I really have to reset my expectations. Just because a drawing program supports layers doesn't mean it's really easy to use, I guess.
Draw doesn't provide true cropping, but display cropping (you can limit which part of a bitmap is displayed - the viewport, sort of...). Right click the image and select "Trim" or "Crop" (I have a Norwegian install where I sit right now, so I can't verify what the English menu says).
The full image is still present in the file. A cropped image from Draw can be pasted to other OpenOffice applications, but the hidden parts of the image can still be revealed by "uncropping".

Pixelation filter is not available to my knowledge. I'd use an overlaid rectangle with some color or pattern fill.

Layers in Draw is not for filters or paths like in more advanced graphics packages, but rather for logical grouping. You can think of it as overhead-projection multisheet transparencies, where overlays would show different categories or levels of detail.

To ensure that hidden areas in Office documents remain hidden, export to PDF or some graphics format.

Re: How to trim?

Posted: Wed Oct 18, 2017 11:12 pm
by david7365
keme, Thanks so much for the additional info.

Re: How to trim?

Posted: Thu Oct 19, 2017 6:43 am
by acknak
Right. So even though Draw doesn't edit images, you can still get what you want by making the changes (crop, overlay filled rectangles to obscure confidential material, etc), then select all the objects and use File > Export ... to an image. The result will be a flattened image (no objects) that should be entirely safe to send out.

Re: How to trim?

Posted: Thu Oct 19, 2017 12:19 pm
by david7365
I understood that point because it was made clearly.

Re: How to trim?

Posted: Thu Oct 19, 2017 12:37 pm
by John_Ha
david7365 wrote:"Trimming" means to select a desired area of a drawing or image and delete the part of the drawing or image that is outside the selected area.
Use an image editor to crop the required area.

See [Tutorial] Some useful hints on using images for a discussion on how best to handle images.

If this solves the problem, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.

Re: How to trim?

Posted: Thu Oct 19, 2017 11:11 pm
by erbsenzahl
david7365 wrote:"Trimming" means to select a desired area of a drawing or image and delete the part of the drawing or image that is outside the selected area.
You may crop your bitmap, then cut and insert (Special Paste) as Bitmap. The former "surroundings" disappear. But as "shape" only a rectangle is possible to use...
This solution is similar to acknak's - export as bitmap and flatten it.

For your above mentioned purpose you don't need GIMP, which is an excellent choice for some other image processing...

Cheers