[SOLVED] Feature #2495: Add tool to Image Workbench to easily scale images

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 4083
Joined: Thu Jan 05, 2017 9:03 pm

[SOLVED] Feature #2495: Add tool to Image Workbench to easily scale images

Postby Kunda1 » Fri Oct 19, 2018 1:30 pm

issue #2495: Add tool to Image Workbench to easily scale images
Feature discussion page
Last edited by Kunda1 on Fri Apr 12, 2019 12:28 pm, edited 1 time in total.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Syres
Posts: 210
Joined: Thu Aug 09, 2018 11:14 am

Re: Feature #2495: Add tool to Image Workbench to easily scale images

Postby Syres » Thu Apr 11, 2019 4:33 pm

quick61 wrote:
Sat Mar 23, 2019 12:59 am
ping
@quick61, as you have not been around for a while could https://www.freecadweb.org/tracker/view.php?id=2495 ticket be closed as this was implemented at the end of 2018 I believe.

Yes, I was bored this afternoon having to go through all 500+ tickets to try to ensure I don't raise a duplicate regarding something entirely different.
User avatar
quick61
Posts: 3772
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Feature #2495: Add tool to Image Workbench to easily scale images

Postby quick61 » Thu Apr 11, 2019 5:51 pm

Syres wrote:
Thu Apr 11, 2019 4:33 pm
quick61 wrote:
Sat Mar 23, 2019 12:59 am
ping
@quick61, as you have not been around for a while could https://www.freecadweb.org/tracker/view.php?id=2495 ticket be closed as this was implemented at the end of 2018 I believe.

Yes, I was bored this afternoon having to go through all 500+ tickets to try to ensure I don't raise a duplicate regarding something entirely different.
Sure, the front end is there, but at least on my system, it's not working. Either something is broke or it never got finished. :(

OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
This post made with 0.0% Micro$oft products - GOT LINUX?
chrisb
Posts: 15185
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature #2495: Add tool to Image Workbench to easily scale images

Postby chrisb » Thu Apr 11, 2019 6:27 pm

It's working here:
- select scaling icon
- select first point
- select second point
- enter distance
- select image in the tree
- Ok

OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16207 (Git)
Build type: Release
Branch: master
Hash: 741533941c67da2f721bf1b7c2d55c987fd22a0c
Python version: 3.7.2
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Syres
Posts: 210
Joined: Thu Aug 09, 2018 11:14 am

Re: Feature #2495: Add tool to Image Workbench to easily scale images

Postby Syres » Thu Apr 11, 2019 6:33 pm

quick61 wrote:
Thu Apr 11, 2019 5:51 pm
Sure, the front end is there, but at least on my system, it's not working. Either something is broke or it never got finished. :(
I think I know what you are seeing, or not as the case maybe. I fortunately have a macro from before this was implemented to compare against. I think the code runs so fast that the line

Code: Select all

FreeCADGui.SendMsgToActiveView("ViewFit")
in src\Mod\Image\ImageTools\_CommandImageScaling.py refreshes the screen so it looks like nothing's happened but to be certain you need to note the XSize and YSize of the imagePlane beforehand. I upscaled an image by just over 4 times and the XSize and YSize changed accordingly but the screen looked no different whatsoever. I can't decide whether it's best to comment that line out or have a message box advising the user that the size was Xoldsize and Yoldsize and now is Xnewsize and Ynewsize. Give it a try, let me know and by all means comment that line out to see if you think it's an improvement, I wasn't involved so I don't know the rational unfortunately.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16267 (Git)
Build type: Release
Branch: master
Hash: ddb335cfe057336f1958d68126bb0471328d735c
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
User avatar
easyw-fc
Posts: 2398
Joined: Thu Jul 09, 2015 9:34 am

Re: Feature #2495: Add tool to Image Workbench to easily scale images

Postby easyw-fc » Thu Apr 11, 2019 7:05 pm

Syres wrote:
Thu Apr 11, 2019 6:33 pm
I wasn't involved so I don't know the rational unfortunately.
I was the one that added some features to this wb...
Here particularly the addition related to View Fit:
https://github.com/FreeCAD/FreeCAD/comm ... e60b98391d
I have added this because I found it useful when a big image is imported and then scaled to little values.
User avatar
quick61
Posts: 3772
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Feature #2495: Add tool to Image Workbench to easily scale images

Postby quick61 » Thu Apr 11, 2019 7:32 pm

Syres wrote:
Thu Apr 11, 2019 6:33 pm
quick61 wrote:
Thu Apr 11, 2019 5:51 pm
Sure, the front end is there, but at least on my system, it's not working. Either something is broke or it never got finished. :(
I think I know what you are seeing, or not as the case maybe. I fortunately have a macro from before this was implemented to compare against. I think the code runs so fast that the line
Well, that wasn't what I was seeing, i was no able to get it to work before, as the dimensions did not change. Not sure what was going on, but it seems to be working now. i even get the error message to select the image plane if I hadn't done so, which I wasn't getting before. Maybe something didn't load? Don't know - :? -

How did that old SNL skit end? ... Never mind....

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
chrisb
Posts: 15185
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature #2495: Add tool to Image Workbench to easily scale images

Postby chrisb » Thu Apr 11, 2019 10:21 pm

I have closed the ticket as solved.
User avatar
Kunda1
Posts: 4083
Joined: Thu Jan 05, 2017 9:03 pm

[SOLVED] Feature #2495: Add tool to Image Workbench to easily scale images

Postby Kunda1 » Fri Apr 12, 2019 12:28 pm

chrisb wrote:
Thu Apr 11, 2019 10:21 pm
I have closed the ticket as solved.
:+1:
Also for this thread summary 8-)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features