Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Problem] Opening an image from the file menu is confusing and not useful #8556

Closed
2 tasks done
julia-m-stephenson opened this issue Feb 20, 2023 · 19 comments
Closed
2 tasks done
Labels

Comments

@julia-m-stephenson
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Forums discussion

No response

Version

0.20 (Release)

Full version info

[code]
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * Curves 0.6.5
  * fasteners 0.4.27
[/code]

Subproject(s) affected?

None

Issue description

When opening a PNG file the view seems to be constrained to a letter box.

image

If you zoom in and out using the scroll wheel it displays tiny.

image

As a workaround I opened the file in inkscape and saved as SVG. This file was opened as a drawing and displayed correctly.

image

Here is the PNG.
DeckEyePlateInstructions

Here is the SVG.
DeckEyePlateInstructions

Thanks.

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@WandererFan
Copy link
Contributor

How are you "opening" the file? What command? What workbench?

@julia-m-stephenson
Copy link
Author

julia-m-stephenson commented Feb 20, 2023

How are you "opening" the file? What command? What workbench?

From the menu bar

File->Open

No WB in particular. This to open a drawing to refer to whilst creating a model. E.g. like SVG opened as a drawing rather than using Geometry.

@WandererFan
Copy link
Contributor

I didn't know png was a valid import type. I don't think this works in v0.21.

You could add the image to a TechDraw Page with TechDraw_Image.

@julia-m-stephenson
Copy link
Author

It's in the list of supported file formats.

https://wiki.freecad.org/Import_Export

It almost works just the zoom levels are incorrect.

This isn't hugely important to me. I'm just raising it as an issue so people know about it. Maybe it's an easy fix or maybe it's something the development team want to drop .

@sliptonic
Copy link
Member

Opening the image isn't terribly helpful since it just opens the image in a new tab and you can't really do anything with it. To be honest, I don't know why this functionality exists.

If you want to use the image as a reference, go to the image workbench. import the image to an imageplane. You can orient the plane in 3D space and scale it as needed. Then it's useful to draw over.

@sliptonic
Copy link
Member

@julia-m-stephenson if the imageplane does what you want, I'm going to suggest we change the title of this PR to "Opening an image from the file menu is confusing and not useful"
Then I'm going to suggest we remove the functionality entirely.

Maybe one of the UI oriented folks like @PaddleStroke or one of the old timers like @yorikvanhavre knows why this exists and if it should be preserved.

@PaddleStroke
Copy link
Contributor

PaddleStroke commented Feb 23, 2023

I didn't knew FC had a basic image viewer. I don't really see the point as all OS have basic image viewers.
I think basic viewer upon opening png is useless and could be removed. However it could be interesting that opening a PNG file does either of the following :
A - trigger the import of the image to an image plane to current document. (but it could be argued that this is the job of 'import').
B - Create a new document with this image in the XY plane.

By the way, the image workbench could maybe be elaborated to enable basic image editing directly in FC.

@WandererFan
Copy link
Contributor

AFAICT, in v0.21 you can not open a png file using File > Open.

@sliptonic
Copy link
Member

sliptonic commented Feb 23, 2023

AFAICT, in v0.21 you can not open a png file using File > Open.

I can. It's still in the supported formats list. Opening from the File menu does the same thing as this command:

2023-02-23_07-35

A - trigger the import of the image to an image plane to current document. (but it could be argued that this is the job of 'import').

That's a good idea. It could automatically align the plane to the current view.

By the way, the image workbench could maybe be elaborated to enable basic image editing directly in FC.

Better tools for scaling and placement but let's kick other kinds of editing down the road.

@WandererFan
Copy link
Contributor

My bad. I was using a build without the ImageWB.

@sliptonic sliptonic changed the title [Issue] PNG files not scaled / displayed properly. [Problem] Opening an image from the file menu is confusing and not useful Feb 23, 2023
@sliptonic
Copy link
Member

FYI, several of the complaints raised at Fosdem were about the image workbench, scaling, and display.

@luzpaz luzpaz added the UI/UX label Feb 25, 2023
@PaddleStroke
Copy link
Contributor

image
What is the image plane icon supposed to look like?

@sliptonic
Copy link
Member

sliptonic commented Mar 19, 2023

  • Move Image loading to core
  • Implement task panel
  • Remove old Image workbench
  • Revise wiki documentation

@adrianinsaval
Copy link
Member

What is the image plane icon supposed to look like?

I think that is a generic FeaturePython icon, not specific to image planes

@sliptonic
Copy link
Member

sliptonic commented Mar 22, 2023

PR 8955 is a significant improvement. It specifically fixes two issues from the Fosdem complaint session

  • Image workbench: once the dimensions are set, changing them uniformly is a pain.
  • Images from Image WB show the back side as black: should be transparent, or the image reversed.

The imageplane now has a dedicated task panel that can be used to adjust the scale and maintain aspect ratio.

The PR preserves the ability to open an image in a separate MDI window. This is deemed a feature since someone may want to look at the image in one window while editing a model in another.

This issue remains open because there is additional work to do.

As of now, there are four different ways to open the image in the MDI window and two ways to open it in an imageplane.

MDI window:

  1. Tools->Load
  2. Image WB toolbar button image_open

Image Plane:

  1. file->import
  2. File->Open...
  3. Drag an image into the 3D window.
  4. Image WB toolbar button image_CreateImagePlane

The image workbench should be considered deprecated and will eventually be removed. When it is, MDI(2) and ImagePlane(4) will go away.

Could the behavior of file->import and file->open differ:
In my opinion file->import should create an imageplane and load the image.
File->open should open the image in a new MDI window
That would make Tools->Load redundant and it could be removed.

Two-point scaling needs a reworked workflow. After that, it can be incorporated into the imageplane task panel and image workbench can be removed.

Did I miss anything?

Note: This comment edited. A stale cache in my build was causing goofy behavior. Sorry about that.

@LHC-Canada
Copy link

It would be great to have support for older model files that already have images loaded into them

@adrianinsaval
Copy link
Member

Would removing the workbench mean that previous image planes will stop working? A migration script might be a good idea then

@adrianinsaval
Copy link
Member

should this be closed now?

@chennes
Copy link
Member

chennes commented Apr 22, 2023

I think so 👍

@chennes chennes closed this as completed Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants