[Solved] Images gone

Discuss the word processor

[Solved] Images gone

Postby toss@usa.com » Tue Jun 02, 2015 4:56 pm

I'm new to open office and not technical at all but I'm working on the last revisions of a 235,000 word novel with images. My images seem to disappear, leaving no frame or border. What is a linked image vs imbedded? Should I insert images via open office commands or just copy and paste from Pixia?
After reading the threads, most over my head, I just now increased my graphics under options, will that solve the problem?

Many thanks for a dummies are me answer.
Last edited by toss@usa.com on Sat Jul 11, 2015 3:50 pm, edited 1 time in total.
openoffice 4.1.1
Posts: 27
Joined: Wed Dec 17, 2014 1:34 am

Re: images gone

Postby acknak » Tue Jun 02, 2015 7:32 pm

If OO Writer goes to load an image for a document and runs into some problem, it simply marks the error and moves on. When you view the document, you see an empty frame marked "read error".

If you then save the document with such missing images, the image data is not available to be saved and so the new file has now permanently lost the image.

This happens rarely, no one knows exactly what causes it. One idea is that computer resources might cause some problem loading the image data, and that increasing the limits might relieve this but it's not proven. In any case, the empty "read error" frame indicates that the image data has not loaded and if you save the document in that state, the loss will be permanent.

When you copy/paste an image into a document, the image data is stored inside the document; there is no external image file. This is an "embedded" image. If the image data gets lost, then it's entirely gone, with no way to recover it. You have to re-create the image (if it's not saved in its own file somewhere).

Alternatively, if you start out with a separate image file and use Insert > Picture > From File ... you have the option to link to the file. A link is just an instruction in the document that says: "here's an image file, load the image data from that". If OO cannot load the image data for some reason you might still see the "read error" frame but the image data can't be lost because it's still safe in its own file.
AOO4/LO5 • Linux • Fedora 23
User avatar
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: images gone

Postby RoryOF » Tue Jun 02, 2015 7:39 pm

It may be helpful to increase the memory allocation in /Tools /Options /OpenOffice : Memory and reduce the number of undo steps to say 10 or 20. Also, your image should not be grossly oversized and or over resolution (180/210 dpi is enough for continuous tone images in normal circumstances. Line graphics can be 600dpi.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
Posts: 31436
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Some useful hints on using images

Postby John_Ha » Wed Jun 03, 2015 1:20 pm

 Edit: This post has been extensively enhanced and rewritten as [Tutorial] Some useful hints on using images.

Future changes will be made to the Tutorial. This post is now redundant and will not be kept up to date. 

I have just been creating a document with 15 images, each a JPG of about 500kB to 1MB, and I found Writer 4.1.1 to be very slow. I need to do some more investigation although I did raise this bug report some time ago Issue 125490 - Writer 4.1.1 very slow with large images, locks up with zoom out on 2 page view. It is even worse with a Master document calling lots of sub-documents - Writer just hanged.

You need some workarounds which are all based on minimising the image file sizes while maintaining the highest sensible quality.

First, know the difference between a photo image, which is a photo; and a graphics image, which is not a photo - it is clip art, diagrams, things with large blocks of the identical colour, drawings, logos and anything with text etc. The image below is composite - part is photo, but it is overlaid with a graphic. (I had to reduce the quality and pixel count to get it to upload as it had to be less than 128kB).

Second, you need to know how many pixels need to be in each image. Assume Image_1 will be 4 inches wide when printed. You need to check with your printer what resolution (in dpi, or dots per inch) they will be printing at. If they say they will be printing at 150 dpi (150 dpi is good quality, 300 is very good, 600 is fantastic quality) then Image_1 needs to be 4 inches x 150 dots per inch = 600 dots (pixels) wide. If you have more pixels that that (and remember a 6 mega-pixel photo is over 3,000 pixels wide!) then they will be wasted and just clog up the .odt file. So re-sample Image_1 to be 600 pixels wide (I use the free IrfanView viewer - it is excellent and I think it has a better re-sampling algorithm than Writer's internal re-sampling algorithm). A 600 wide pixel image file will be 25x smaller than a 3,000 wide pixel image. Use Image > Resize/Resample as in the image below where I am re-sampling a 4,320 pixel image from my camera down to 600 pixels wide which will make the file 52x smaller (600/4,320) * (600/4,320) = 51.84x smaller.

Third, always insert JPG files by Insert > Picture > From file, or by dragging the JPG file into Writer as Writer saves the image as a JPG in the .odt file. Never insert photos or JPG files by copy and paste as Writer then saves them as PNG files which are likely to be MUCH larger than the JPG file. You can insert graphics files (clip art, diagrams, cartoons etc - they will be PNG or GIF or TIFF files) in any way - by Insert > Picture > From file, or by dragging the graphic file into Writer, or by Copy and Paste. Whichever way you choose, they will be stored either as their original file format, or as PNG files if you Copy/Paste.

Fourth, make sure you are using compressed file formats. JPG uses lossy compression and is excellent for photos, but useless for graphics as it blurs edges, add blotches etc. PNG, GIF and Compressed TIF (or compressed TIFF) use lossless compression and are excellent for graphics, but useless for photos as they don't compress the files size much if at all, and may actually increase the file size compared with JPG - and by 3x or more! Never use BMP as it is not a compressed file format.

Fifth, if image size is still a problem while you are editing, then create some draft images with really small pixel counts - say just 100 pixels wide. Stretch them to be the same size as the proper pictures. The image will be recognisable, but the quality will be rubbish, but the file size will be 36x smaller than even the 600 pixel file and 900x smaller than the 3,000 pixel image, and Writer will fly while you are editing. When you are finished and ready to publish, replace the draft images with higher quality images. See the second image which I re-sampled down to 100 pixels wide - it is only 22kBytes but recognisable even when stretched to the original size.

Alternatively, put all the images in a folder called Images, and create a second folder of low pixel count images with the identical names. Link the images from the folder Images to see the proper images. Stop Writer, replace the images in the Images folder with the low resolution images, and restart Writer. It will now pick up the low resolution, much smaller images. When you want to see the proper images, put the full sized images in the Images folder. Check the up to date Writer guide and/or the OOo v3.3 Writer Manual for information on using linked images.

Sixth, if you can get away with using 8 bit colour images instead of 24 bit colour images, then the file sizes will be 3x smaller again. Change the colour depth in IrfanView by Image > Decrease colour depth.

Seventh, when you save a JPG file (in IrfanView and other editors) you can choose the Quality Factor for the file (0 = worst, 100 = best). The higher the QF, the better the quality of the image BUT the larger the file. 85 is a good compromise for normal photos, 90 to 95 might be necessary of you have very fine detail in the photo, or a composite image with photo and text. JPG images from my camera seem to have been saved at QF100 as saving at QF85 reduces the file size enormously.

Eighth. The default values of the AOO Graphics Cache are rather small. PCs have much more memory these days, so it is worth while to increase them as shown in the image below. Tools > Options > OpenOffice > Memory ...

Ninth. acknak's suggestion in the next post is good:

acknak wrote:It may also help to turn off graphics display: Tools > Options > OO Writer > View > Display > Graphics & Objects: OFF

This shows images as empty frames labeled "graphic" but the images will still appear in File > Page Preview and in print/pdf.

Tenth, and VERY important. Do not be too quick in slamming the laptop lid shut when saving the file - give AOO plenty of time to close gracefully, and to save the file properly, and then to save the profile file (which is the last thing it does). An AOO file of 80MBytes takes a LONG time to write - several (many?) seconds. I am fairly convinced that lots of problems arise when people either slam the laptop lid shut while the file is still being written, or else say "Oh! I forgot to ...", and then try to open the file which is still being saved.

... and a note about Anchors and Wrap.

When you insert an image into Writer it needs to be anchored to something. Right-click an image > Anchor ..., and you see the options, where you can Anchor to the page, Anchor to a paragraph, Anchor TO a character or Anchor AS a character.

If you move the item to which the image is anchored, it moves with it; if you delete the item, the image is deleted.

Anchor AS a character gives the least flexibility for locating the image, but gives very stable image location becuause the image is treated as a big character. If you Anchor AS a character after the " a " in the word "cat", the image will always be located " c a [image] t". See Help for more information.

Similarly, the Wrap options allow you to control how the text will flow round the image. Also, if you right-click the image > Picture ..., you get many options where you can, for example, set the gap between the image and the text. See Help for more information.

There is a whole chapter on images in the OOo v3.3 Writer Manual - see Chapter 8 - Working with Graphics

Using IrfanView to resample an image

Clipboard01 100.png
Image resampled to 100 pixels wide
Clipboard01 100.png (22.62 KiB) Viewed 7842 times

 Edit: Edited to add information 
Graphics cache values increased from smaller default values
Last edited by John_Ha on Mon Jan 16, 2017 4:42 pm, edited 15 times in total.
LO, 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.
Posts: 7795
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Images gone

Postby acknak » Wed Jun 03, 2015 1:38 pm

It may also help to turn off graphics display: Tools > Options > OO Writer > View > Display > Graphics & Objects: OFF

This shows images as empty frames labeled "graphic" but the images will still appear in File > Page Preview and in print/pdf.
AOO4/LO5 • Linux • Fedora 23
User avatar
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Return to Writer

Who is online

Users browsing this forum: No registered users and 12 guests