Bug 241726

Summary: BQM Resize tool : make options more flexible [patch]
Product: [Applications] digikam Reporter: Droebbel Melta <droebbel.melta>
Component: Plugin-Bqm-ResizeAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: caulier.gilles, kallewirsch, kde, metzpinguin, sambhavdusad24
Priority: NOR    
Version: 1.3.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Preserve Aspect Ratio by width/height added with some minor changes.
Preserve Aspect Ratio does not work properly.
Added height input. Now, image can be resized from both the sides.
Minor modifications in preserve aspect ratio by width/height
New Improvements
Added preserve aspect ratio by longest option.
Resets the sliders when unchecked

Description Droebbel Melta 2010-06-14 14:07:46 UTC
Version:           1.3.0 (using KDE 4.4.3) 
OS:                Linux

Currently, resize is limited to setting the desired length of one side of the image, whith a maximum value of 4000 pixels.

Often, it is required to fit an image into a certain frame. So two values need to be given, one for the longer and one for the shorter side. The image should then be resized so that one side has the set value and the other side has the set value or less, preserving aspect ratio.

The values should not be limited to 4000 pixels. Better use input boxes instead of sliders for that.

Reproducible: Didn't try
Comment 1 Andi Clemens 2010-11-15 15:42:19 UTC
Right, there should be more options, like in the resize tool in the image editor.
Comment 2 caulier.gilles 2010-11-15 15:57:42 UTC
I agree.

As others tools shared between editor and BQM, a settings widget need to be writted and used in both. A filter implementation based on mutithreaded filter must be implemented. all this code must be placed in dimg/filters/...

Gilles Caulier
Comment 3 caulier.gilles 2014-09-01 11:35:51 UTC
*** Bug 320362 has been marked as a duplicate of this bug. ***
Comment 4 caulier.gilles 2014-09-01 11:36:08 UTC
*** Bug 320360 has been marked as a duplicate of this bug. ***
Comment 5 caulier.gilles 2014-09-01 11:36:24 UTC
*** Bug 320363 has been marked as a duplicate of this bug. ***
Comment 6 caulier.gilles 2014-12-10 21:36:27 UTC
*** Bug 341757 has been marked as a duplicate of this bug. ***
Comment 7 caulier.gilles 2015-07-04 10:01:12 UTC
*** Bug 252337 has been marked as a duplicate of this bug. ***
Comment 8 kde 2018-07-09 15:35:49 UTC
I agree with everyone else's assertions on being able to set a desired height and width. I want to add that:

I believe there should be an option to resize based on height alone where the width simply scales with it. 

The ability to use the 'Restore Photograph' option would be great too.
Comment 9 Sambhav Dusad 2019-02-06 06:31:09 UTC
I tried reproducing the issue and I was able to resize the image with both the sides. Also, the image can be resized upto 999% of original image which was greater than 4000px.

When we right click on the bar, it turns into an input box, so we don't need to implement that.

There can be other fetures like some predefined set of dimensions and some user configurable dimensions which they use frequently. Also, having more units like cm or inches would be great for the user.
Comment 10 Sambhav Dusad 2019-02-15 11:15:58 UTC
Created attachment 118098 [details]
Preserve Aspect Ratio by width/height added with some minor changes.

Preserve Ratio Checkbox not working properly.
Comment 11 Maik Qualmann 2019-02-15 19:09:26 UTC
Also having to set a height is not a good idea. Try to reduce images with different resolution and orientation to a common maximum edge length of 1500 pixels. Depending on the orientation, either the width or the height should be 1500 pixels each. That is no longer possible. The BQM can have images with different resolutions whose height and width we do not know.

Maik
Comment 12 Sambhav Dusad 2019-02-15 19:56:30 UTC
Created attachment 118121 [details]
Preserve Aspect Ratio does not work properly.
Comment 13 Sambhav Dusad 2019-02-17 21:52:26 UTC
Created attachment 118169 [details]
Added height input. Now, image can be resized from both the sides.

Note: Sliders are enabled even when Use Custom is not checked.
Sorry for the inconvenience.
Comment 14 Sambhav Dusad 2019-02-20 19:57:35 UTC
Created attachment 118233 [details]
Minor modifications in preserve aspect ratio by width/height
Comment 15 Maik Qualmann 2019-02-20 20:09:51 UTC
Your patch can not be applied, you are not in sync with the git archive. Best you load your resize.cpp completely high.

Maik
Comment 16 Maik Qualmann 2019-02-20 20:36:53 UTC
I have reset the development/dplugins branch before the first change to the resize tool. Save your resize.cpp and resize.h and syncronize your branch and play back your modified data and create a new patch.

Maik
Comment 17 Sambhav Dusad 2019-02-20 21:25:11 UTC
Created attachment 118234 [details]
New Improvements
Comment 18 Sambhav Dusad 2019-02-21 11:36:33 UTC
Created attachment 118250 [details]
Added preserve aspect ratio by longest option.
Comment 19 Maik Qualmann 2019-02-24 12:14:30 UTC
There are still some problems here. In custom mode, the aspect ratio check boxes are grayed out, but the last checked state is retained and processed. I also think that the wish from the description can not yet be realized.

Maik
Comment 20 Sambhav Dusad 2019-02-24 14:33:38 UTC
Created attachment 118335 [details]
Resets the sliders when unchecked

Thanks for pointing it out.