adjust frame to image by default

Previous topic - Next topic

hugogogo

I don't know if I've missed a parameter, but the default action when I import an image by drag and drop is something I don't understand :

it creates a frame that seems to always be of the right proportions, but not always the right size, sometimes it fits, sometimes it's smaller, never bigger. So for some image I have to do an additional action to "adjust the frame to the image" (for single image by a right click, for multiple image in item > adjust)

I don't know how scribus decides that some images will fit to the frame, and some will not, and I don't know why it would be the default behavior ? Is it sometimes convenient to have an image cropped when you import it ?

and mostly, I don't find where to change that by default ? is it possible ?

utnik

hi hugogogo

it should work according your settings under 'preferences' → 'item tools' → 'images' → 'scaling' (for existing .sla files under 'document setup' → 'item tools' → 'images' → 'scaling'...)
and – yes, there are situations where i prefer a 100% scaling...

utnik

hugogogo

thank you for your answer utnik :)

it does the trick ! but not in the way i would expect it. The images are now fitting their frame when i drag and drop them on a scribus project, but they are not at their right size, they are scaled to a smaller size, which explain your last phrase
Quoteyes, there are situations where i prefer a 100% scaling
. Yes, I do too ! In tons of situations.

Why would scribus change the size of an image when importing it ? and on what basis ? How does it choose the new scale ? And can i prevent this ?

MrB

Scribus never edits the image, its just how its presented. However to understand your issue more, we would need to know about what version of Scribus you are using, and probably get a copy of the image.

Nermander

I guess the issue here is that a pixel does not have a defined size. Most likely Scribus honors the resolution (DPI) stated in the image file. Changing this value before importing the image probably changes how Scribus scales the image.


hugogogo

of course, here are more informations :

I'm using scribus 1.5.8

step 1 - settings : file > document setup > item tools > images > free scaling (100% 100%)

step 2 - drag and drop the image :
Screenshot_2023-06-05_00-10-31.png

step 3 - right click > image > adjust frame to image :
Screenshot_2023-06-05_00-11-41.png

step 4 - new document, settings : file > document setup > item tools > images > scale image to frame size (keep aspect ratio)

step 5 - drag and drop the image :
Screenshot_2023-06-05_00-08-01.png

the scaling value in the "image properties" panel on the right is coherent. And the frame size is consistent, whether we have the option "free scaling" or "scale image to frame" activated, the frame has the same size. And for this image, the frame is apparently 25.91% of the image size (I mean, the 72 DPI that the image states to be)

But why do scribus choose to create a frame that is smaller than the image size, and how is the size of this frame chosen ?

a.l.e

when you drag and drop an image into scribus, the size of the newly created frame will not bigger than the page.

in your case, it's maxed at the page width.

believe me, that's a good idea: you don't want to resize an image that is 100 times the page size!

now that you know this, what can you do?

on the one side, you can "correctly" set the image resolution before dragging the image into scribus: scribus will retain it, when creating the frame and you will get something that is closer to what you are expecting.

you can also first create a frame of the correct size (and put it in the scrapbook, so that you can insert it on new pages with a double click) and drop the image on the existing frame.

also, if you want the images to always (or mostly) scale to the frame size, you can modify the preferences of the "item tools > images" (or in the document settings, for the current document) and tell scribus about your predilection.

then, the images will be scaled to the frame size by default.

voilà, i hope that helps..

hugogogo

Quote from: a.l.e on June 05, 2023, 08:09:13 AMwhen you drag and drop an image into scribus, the size of the newly created frame will not bigger than the page.

all right ! It explains everything, thank you :) I see why it's a good idea indeed