6

I have a odt file with many heavy images and to be friendly with some one i want to forward the odt i want to decrease the images resolution by hand.

How to do it?

3

Finally i found a way:

  1. Select the image.
  2. In the Image toolbox, there is a filter command: command it.
  3. Select the mosaic filter.
  4. Set the width and height pixels values. The bigger the values, the smaller the resolution and the smaller the file size.
0

Do exactly that: By hand.

LibreOffice is not an image editor! Use Gimp or some such to alter the pictures resolution.

2
  • Sometimes (most of the time) you get a document with images embedded without the image files. This is not a big problem since you could simply rightclick the image and save it, then edit it with anoter tool. The problem is to reinsert the image: by now, what i can do is insert another image and delete the old one, which causes the redefinition of the image meta information (Label, etc). Do you now how to "change" the image without changing the "figure"? – jgomo3 Apr 17 '12 at 20:07
  • 1
    No idea, sorry. But feel free to submit a bug report at libreoffice.org/get-help/bug – phw Apr 18 '12 at 14:25
0

Select the picture (image). Go to 'File' menu, then select the 'Export' Choose the file type (e.g., JPEG) In the next screen, you are asked to state the resolution of the output file.

0

I wrote an script to do this:

#!/bin/bash

[ $# -ne 1 ] && echo -e "Usage $(basename "$0") FILE.odt";

filename=$(basename -- "$1")
filename="${filename%.*}"

mkdir document
cd document || exit
unzip "../$1"

time mogrify -colorspace RGB -resize '786432@>' -colorspace sRGB ./Pictures/*  # Alt: -resize '1024x768>'. 2160000@> for '1200×1800>'
du -sh ./Pictures/
time mogrify -sampling-factor 4:2:0 -quality 75% -interlace Plane ./Pictures/*
du -sh ./Pictures/
time mogrify -alpha off ./Pictures/*.png
du -sh ./Pictures/

zip -0 --no-extra "../$filename-comp.odt" mimetype # Copy mimetype file with: Zero compression. Do not save extra file attributes.
zip --recurse-paths "../$filename-comp.odt" * --exclude mimetype

exit 0

# Alternatives

mogrify -gaussian-blur 0.05  -quality 75% -interlace Plane ./Pictures/*  # Lower quality/smaller file

Then try ls -lhS *.odt. I reduced to 40% of the original file size.
du and time are only for information purpose.

I still don't know how to convert internally all PNGs to JPEGs (I don't need PNGs alpha channel). That would reduce file size much more.

Reference

-1

Exporting to pdf is another solution: instead of lossless image compression, use jpeg. I've just reduced a letter with lots of photos from 23Mb to 3Mb and it looks fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.