View Issue Details

IDProjectCategoryView StatusLast Update
0013561ScribusGraphics / Image Framespublic2020-06-15 12:22
ReporterspaceChRiS Assigned Tojghali  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
PlatformallOSallOS Versionall
Fixed in Version1.5.1svn 
Summary0013561: Scale image always to higher scaling value when chain is joined
DescriptionIf the chain icon besides the x and y image scales is enabled ("joined"), both dimensions are scaled to the x value. Instead, scaling to max(x scale, y scale) would be a more consistent behavior and would additionally allow for a simple workflow to fill an image within its frame while the original aspect ratio is maintained. The latter works, with the current behavior, only for the x > y case.

The workflow for filling a frame would be

  1. Click the picture frame and in the "Image" tab set the "scaling"
     to "to frame size" without checking proportional. That gives a
     distorted image.

  2. Select "Free scaling" which leaves the image distorted and shows
     the x- and y-scale percentage.

  3. Click the chain icon to set the higher percentage for both dimensions.

Now, the frame is filled with an undistorted image and the position can be adjusted with either the x or y position value, depending on which side the image is cropped.

The change is a simple task and would make manual copying of the percentage value or running special scripts obsolete. An open question currently discussed on the users mailing list is if this change would introduce any problematic side effects. See the discussion starting on 2015-11-23 entitled "Fit photograph to frame".
Tagspatch
PatchYes

Activities

ale

2015-11-25 13:12

manager   ~0037674

this is for the free scaling...

of course, i agree with the proposal :-)

ale

2015-11-25 20:05

manager  

max-xy-chain.diff (713 bytes)   
diff --git a/scribus/ui/propertiespalette_image.cpp b/scribus/ui/propertiespalette_image.cpp
index b0ae4ea..2821be0 100644
--- a/scribus/ui/propertiespalette_image.cpp
+++ b/scribus/ui/propertiespalette_image.cpp
@@ -706,7 +706,9 @@ void PropertiesPalette_Image::handleImageWHRatio()
 	imageYScaleSpinBox->blockSignals(true);
 	if (keepImageWHRatioButton->isChecked())
 	{
-		imageYScaleSpinBox->setValue(imageXScaleSpinBox->value());
+		double maxXY = qMax(imageXScaleSpinBox->value(), imageYScaleSpinBox->value());
+		imageXScaleSpinBox->setValue(maxXY);
+		imageYScaleSpinBox->setValue(maxXY);
 		handleLocalScale();
 		keepImageDPIRatioButton->setChecked(true);
 		cbProportional->setChecked(true);
max-xy-chain.diff (713 bytes)   

ale

2015-11-25 20:07

manager   ~0037680

btw, scribus/ui/propertiespalette_image.cpp seems to have wrong (dos) line endings...

jghali

2015-11-25 21:40

administrator   ~0037684

I committed the patch, it was incomplete tho. I also modifed handleImageDPIRatio() to have consistent behavior between the two chain buttons.

ale

2015-11-26 07:49

manager   ~0037686

ok!
thanks!
no idea if the dpi ratio chain is really used/useful and should have the same behavior...
the new behavior probably does not harm, but we might think about removing this second chain and only leave the one for h/w...

Kunda

2016-01-21 15:00

updater   ~0038323

Do we close this ?

Issue History

Date Modified Username Field Change
2015-11-25 12:52 spaceChRiS New Issue
2015-11-25 13:12 ale Note Added: 0037674
2015-11-25 20:05 ale File Added: max-xy-chain.diff
2015-11-25 20:05 ale Summary Scale image always to higher scaling value when chain is joined => PATCH: Scale image always to higher scaling value when chain is joined
2015-11-25 20:06 ale Tag Attached: patch
2015-11-25 20:07 ale Note Added: 0037680
2015-11-25 20:42 Kunda Patch No => Yes
2015-11-25 21:37 jghali Summary PATCH: Scale image always to higher scaling value when chain is joined => Scale image always to higher scaling value when chain is joined
2015-11-25 21:40 jghali Note Added: 0037684
2015-11-25 21:40 jghali Status new => resolved
2015-11-25 21:40 jghali Fixed in Version => 1.5.1svn
2015-11-25 21:40 jghali Resolution open => fixed
2015-11-25 21:40 jghali Assigned To => jghali
2015-11-26 07:49 ale Note Added: 0037686
2016-01-21 15:00 Kunda Note Added: 0038323
2016-02-13 19:51 cbradney Status resolved => closed