Pictures in cells

Discuss the word processor
Post Reply
rogermelfen
Posts: 2
Joined: Wed Nov 29, 2017 8:52 pm

Pictures in cells

Post by rogermelfen »

In a document i use a table with cells of different sizes. Some i want to use only for pictures, some for text only. What i hope is possible, is to insert pics to cell without to have to drag and resize manually. Is that possible? I use pics only from my camera on my cell phone.
Thx in advance for beautiful answers. :-)
Office 3 on Windows 10
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Pictures in cells

Post by Lupp »

See the recent thread viewtopic.php?f=7&t=91368 .
Last edited by Lupp on Thu Nov 30, 2017 12:01 pm, edited 2 times in total.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Pictures in cells

Post by Lupp »

Doesn't the picture you insert into a cell resize automatically as it does for me? What type of Image? What do you expect exactly?
My experiences seem to teach me that an inserted image is by default resized to the available space as large as possible keeping the aspect ratio. If the image is inserted int a table cell the size is set regarding mainly the column width.
If the respective row of your table has the height setting 'Fit to Size' and the width of the column is reasonable, the image should fill the cell horizontally and the row height should adapt to the height of the image. If the otherwise empty paragraph inside the cell showing below the picture is unwanted/not intended for use, you can anchor the image 'As Character' to avoid this.
Any subsequent changes in cell size (column width) are not handled automatically.

BTW: Your signature shows (roughly) a very old version. You should consider to update AOO. If already done so, please update your signature.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
rogermelfen
Posts: 2
Joined: Wed Nov 29, 2017 8:52 pm

Re: Pictures in cells

Post by rogermelfen »

Lupp wrote:Doesn't the picture you insert into a cell resize automatically as it does for me? What type of Image? What do you expect exactly?
My experiences seem to teach me that an inserted image is by default resized to the available space as large as possible keeping the aspect ratio. If the image is inserted int a table cell the size is set regarding mainly the column width.
If the respective row of your table has the height setting 'Fit to Size' and the width of the column is reasonable, the image should fill the cell horizontally and the row height should adapt to the height of the image. If the otherwise empty paragraph inside the cell showing below the picture is unwanted/not intended for use, you can anchor the image 'As Character' to avoid this.
Any subsequent changes in cell size (column width) are not handled automatically.

BTW: Your signature shows (roughly) a very old version. You should consider to update AOO. If already done so, please update your signature.
Thx for answering. My signature is very wrong. I have win10 and AOO 4.1.4 Sorry bout that.

The picture im inserting "Insert-pic-from file" does not resize automatically within the cell. Thats the whole problem. Instead it resizes (drags the height) the cell. I've tried with pics of different sizes and resolustion (all jpeg), and it seems like its very random what the program decides to do, sometimes the pic is resized, sometimes not. I dont see the connetion. Im looking for a solution that "tells" the pic to fit the cell no matter what. Is that not possible?
About the "Fit to Size", that option is selected.
Thx in advance for further help. :-)
Office 3 on Windows 10
Bill
Volunteer
Posts: 8932
Joined: Sat Nov 24, 2007 6:48 am

Re: Pictures in cells

Post by Bill »

After a few short tests, I haven't noticed any randomness. When a picture is inserted in a table cell, it's width adjusts to fit the column width and the picture's height adjusts to keep the aspect ratio constant. If "Fit to size" is enabled for the row height, then the row height will increase if necessary to keep the picture in the cell. If "Fit to size" isn't enabled, then the row height does not change and the picture may extend below the cell. AFAIK there is no setting that tells a picture to adjust its size to fit the existing row height instead of the column width or to adjust the height and width independently to fit in the current cell size.

I also tried inserting pictures in frames, page columns and section columns and the behavior was similar. The picture width resizes to fit the width of the frame, page column or section column and the height changes to keep the aspect ratio constant.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Pictures in cells

Post by Lupp »

rogermelfen wrote:The picture im inserting "Insert-pic-from file" does not resize automatically within the cell. Thats the whole problem. Instead it resizes (drags the height) the cell.
From my experience: The picture does resize - as a rule. However, there are two dimensions of the table cell, and the aspect ratio (AR) of the cell will not be the same as the AR of the image. There is a conflict needing to be resolved. The default solution I know - not from specifications but from experienc - is to use the available space in width and to keep the AR of the image. If the target is a cell within a text table or a frame , and the height is set to some value with the option 'Fit to size' or 'AutoSize', it will get sized up if needed to keep the complete image.
This is based on the assumption that the Width of the 'Original Size' of the image is not smaller than the available width of the cell, frame, page respectively.

Question in return: How would you specify the behaviour to get what you want - regarding the basic conflict I mentioned?

Something like a workaround:
-- You may have pictures of a common aspect ratio as you get them from a digicam, 3:2 e.g.
Prepare the "containers" (cells in this case) or graphic styles (or both) with the same aspect ratio (reagarding distances from the borders where needed).
-- Some of your pictures are "potrait" others are "landscape" (reciprocal AR).
Prepare two kinds of cells / graphic styles.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply