2

I have jpg images scanned from photographic slides. I find that when I place one of these on a slide it appears at approximately the size of the original transparency rather than scaling to fit the slide. Looking in Position and Size there does not seem to be an automatic way of expanding it to fit. Is there an automatic or quick way of doing this rather than resizing manually?

2
  • @Fabby I can't find anywhere a detailed description of the allowed scope of questions here. Can you point to where that is documented please? My question does of course relate to using LibreOffice on Ubuntu (14.10). I note that searching for LibreOffice yields 3715 results.
    – clanlaw
    Feb 2, 2015 at 8:43
  • Bad day yesterday... Maybe I was too quick to close this off... Closure revoked, my bad.
    – Fabby
    Feb 2, 2015 at 9:06

1 Answer 1

0

I don't believe this is an option in impress as an alternative:

You could write a script to do the manual step for you on a directory full of images you wanted to resize. I would likely do this from the terminal with avconv like this: avconv -i input.jpg -vf scale=160:120 output_160x120.png

Where scale is the width and height desired. granted you need to match the orignal ratio or the image won't look quite right so if your image ratio is 4x3 you might use 320:240, and 16x9 you might use 320:180. Based on your comment you might use 280:467. Of course you'll need a loop to iterate through all the input files.

#!/bin/bash

for f in *.jpg;
do    
command="avconv -i $f -vf scale=160:120 $f.160x120.png"
$command
done

You could modify this to meet your needs. Don't forget to set permissions on the script to be executable..

Note: Spaces in filenames will break this script...

If you need to remove them you might try

rename "s/\s+//g" *

or

IFS="\n"
for file in *.jpg;
do
    mv "$file" "${file//[[:space:]]}"
done

Space removal Source: https://stackoverflow.com/questions/15347843/remove-whitespaces-from-filenames-in-linux

3
  • Thanks for the suggestion Elder Geek, but the original size of the image (in pixels) is not the problem. The images are large in terms of pixels (2808x4675). The problem seems to be the exif data which has x and y resolutions at 2400 per inch and Impress appears to be interpreting this and scaling the image to the original size (inches) of the image scanned. I could hack the exif data of the files, but I was really looking for a general way of doing this. It seems surprising that there is not a way in Impress of asking for the image to fit the slide. Apparently not.
    – clanlaw
    Feb 3, 2015 at 21:25
  • Have you tried my solution? I doubt the exif data you refer to would be preserved.
    – Elder Geek
    Feb 4, 2015 at 0:08
  • I had failed to notice that you suggested to converting to png as well as scaling it. Changing to png does of course lose the png data Having tried then it messes up the length/width ratio and loses detail in the image as expected. However I now realise that I only see the problem if I insert the image into a completely blank empty slide, if I insert into on of the template slides with title bar and text box then the original image is scaled to fit the box as it should.
    – clanlaw
    Feb 4, 2015 at 11:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .