Insert Bitmap Image, can't change object width or height

Discussions about the development of the TechDraw workbench
BrettCA
Posts: 4
Joined: Thu Jun 20, 2019 9:28 pm

Insert Bitmap Image, can't change object width or height

Postby BrettCA » Thu Apr 08, 2021 12:14 am

I am able to insert PNG images into a Techdraw page with the default width and height of 100 units and adjust the scale of the image without any difficulty. However, I don't seem to be able to adjust the width and height of the image object.

I can alter the width and height values in the Combo View and the new entries seem to be accepted in those fields; 200, 300, whatever I put in, there is no error in the Python console and I know a recompute is being performed, but there is no change in the size of the image object on the page. It doesn't budge from 100 x 100. Hitting the recompute button also has no effect. Entering values via the Python console also produces no effect.

I know this has worked in prior builds of v0.19 but not sure how far back.

Thanks,
Brett
screencap.png
screencap.png (133.37 KiB) Viewed 308 times
OS: macOS Mojave (10.14)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: (HEAD detached at 0.19.1)
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
chrisb
Posts: 33587
Joined: Tue Mar 17, 2015 9:14 am

Re: Insert Bitmap Image, can't change object width or height

Postby chrisb » Thu Apr 08, 2021 5:19 am

Please add a simple file showing the issue.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Roy_043
Posts: 2735
Joined: Thu Dec 27, 2018 12:28 pm

Re: Insert Bitmap Image, can't change object width or height

Postby Roy_043 » Thu Apr 08, 2021 7:19 am

Confirmed. There is indeed a regression here. Works in V0.18, not in V0.20.

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.24587 (Git)
Build type: Release
Branch: master
Hash: 1f62d4666102d8efd4d8f3ba58a1037456a3bcfb
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Dutch/Netherlands (nl_NL)
BrettCA
Posts: 4
Joined: Thu Jun 20, 2019 9:28 pm

Re: Insert Bitmap Image, can't change object width or height

Postby BrettCA » Thu Apr 08, 2021 7:48 pm

Roy_043 - thanks for confirming I am not losing my marbles 🤪 I'll dig up an old release to get through my current task.

chris_b - the problem doesn't seem to be specific to a file. I created a few new blank FCStd files with blank TechDraw templates and tried a few different PNG images with consistent results. Would you need me to attach one of the images I am using as well, for your test to be valid?
Syres
Posts: 975
Joined: Thu Aug 09, 2018 11:14 am

Re: Insert Bitmap Image, can't change object width or height

Postby Syres » Fri Apr 09, 2021 8:39 am

Based on this git commit 24139bf I wouldn't expect width and height to still be available unless it was to stop errors loading old files Width and Height are just for the Crop function in the View tab. So if I load a JPG at 465 x 511 it loads at the correct size (but still showing 100x100 in the Data tab) on 0.19.1 with my config files. I'll see if I can find an old thread around that time that might explain the thinking around it.

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United Kingdom (en_GB)

Edit: Original thread and advice from @wandererfan on how to use https://forum.freecadweb.org/viewtopic.php?f=35&t=45927
Edit 2: Tested Crop function with Width and Height successfully
Syres
Posts: 975
Joined: Thu Aug 09, 2018 11:14 am

Re: Insert Bitmap Image, can't change object width or height

Postby Syres » Fri Apr 09, 2021 9:28 am

Submitted a PR to fix a minor bug when changing Crop from True to False https://github.com/FreeCAD/FreeCAD/pull/4724 and mentioned possible backport to 0.19 Release branch.