[Solved] Delete the part outside a selected area

Discuss the drawing application
Post Reply
david7365
Posts: 32
Joined: Thu Mar 22, 2012 8:59 pm

[Solved] Delete the part outside a selected area

Post 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.
Last edited by MrProgrammer on Fri Dec 04, 2020 2:54 am, edited 1 time in total.
Reason: Tagged ✓ [Solved]
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to trim?

Post 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.
AOO4/LO5 • Linux • Fedora 23
david7365
Posts: 32
Joined: Thu Mar 22, 2012 8:59 pm

Re: How to trim?

Post 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.
User avatar
MrProgrammer
Moderator
Posts: 4895
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: How to trim?

Post 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.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
david7365
Posts: 32
Joined: Thu Mar 22, 2012 8:59 pm

Re: How to trim?

Post 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.
User avatar
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: How to trim?

Post 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.
david7365
Posts: 32
Joined: Thu Mar 22, 2012 8:59 pm

Re: How to trim?

Post by david7365 »

keme, Thanks so much for the additional info.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to trim?

Post 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.
AOO4/LO5 • Linux • Fedora 23
david7365
Posts: 32
Joined: Thu Mar 22, 2012 8:59 pm

Re: How to trim?

Post by david7365 »

I understood that point because it was made clearly.
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to trim?

Post 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.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
erbsenzahl
Volunteer
Posts: 254
Joined: Tue Apr 18, 2017 8:23 am
Location: Germany

Re: How to trim?

Post 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
LibreOffice current versions 7 and OpenOffice 4.1.15
on LinuxMint 20 - 21 Mate, W10-64 pro
Post Reply