Loading image produces grey rectangle

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
DoubleHP
Posts: 15
Joined: Sun Mar 05, 2017 6:11 pm

Loading image produces grey rectangle

Post by DoubleHP »

Hello. I want to get a picture below a sketch to draw over it.

I use the image workbench; with open image view, I get my picture in a new tab (it looks correct); with create planar image, i get a grey rectangle on the top, and black on the bottom.

Yes I have triple checked the size (rectangle fits my monitor), looked both sides of the plane; I get expected stuff in OPEN IMAGE VIEW (so FCAD can read the file and it's not corrupted), I hid all other objects to be sure it's not masked by other items; I checked both faces in 3D; I moved the FCAD window on all my monitor to check Xrand; I tried with a reduced image (50KB jpeg instead of 2MB).

When I load my image, the grey square is said to have the good size (size in pixel is the same as with image viewers).

Also got a grey square witht his file, which is said to work in other threads of this forum:
download/file.php?id=20655

OS: "Gentoo Base System release 2.2"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.Unknown
Build type: Release
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
Last edited by DoubleHP on Mon Mar 13, 2017 6:39 pm, edited 1 time in total.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Loading image produces grey rectangle

Post by bejant »

Did you try Zoom > Fit All after importing the image?
Image
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Loading image produces grey rectangle

Post by NormandC »

DoubleHP wrote:Also got a grey square witht his file, which is said to work in other threads of this forum:
chrome://downloads/mnt/big/tmp/20160223b-seishiro.fcstd
We cannot possibly locate this file or the forum topic it's attached to with this dead link that refers to your own desktop.

Please post the proper url.
DoubleHP
Posts: 15
Joined: Sun Mar 05, 2017 6:11 pm

Re: Loading image produces grey rectangle

Post by DoubleHP »

bejant : yes, did not help.

NormandC: try this link (I will try to edit original post): download/file.php?id=20655
DoubleHP
Posts: 15
Joined: Sun Mar 05, 2017 6:11 pm

Re: Loading image produces grey rectangle

Post by DoubleHP »

After sending my FCAD file on a pastebin, other people could see my picture, while, I could not. This means, the procedure I use to insert my picture is good, and, my FreeCAD produces a correct file; the problem is a bug, either in how my FreeCAD renders pictures, or around Xorg.

So, there is a bug, but my X has so many problems (Xinerama is ... how to say it with PG12 words ... very challenging), I am not going to assume it's FreeCAD.

So, for ref: FCAD 0.16 can insert pictures, but, if you see them with a black face below, and grey above, the problem is not about how you inserted it, the problem is about the visual rendering =>
- it is a big issue for me, because I wanted to sketch over a reference image
- not an issue when you want to decorate an object, project file will work for your collegues.
User avatar
Willem
Veteran
Posts: 1852
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: Loading image produces grey rectangle

Post by Willem »

Hi, with the fit all command I get the picture
Schermafdruk van 2017-03-18 14-44-07.png
Schermafdruk van 2017-03-18 14-44-07.png (212.64 KiB) Viewed 1655 times
If that does not work for you I think you must try to delete the configuration files of Freecad. Later when opening Freecad automatically creates new configuration files. On Ubuntu the configuration files can be found here home/Myname/.Freecad I assume in Gentoo it is something similar and the files are system.cfg and user.cfg
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Loading image produces grey rectangle

Post by NormandC »

I wonder if it's a graphics card/chipset or graphics driver issue?

Can you provide details on them, and what OpenGL version they support? (Not that I would know what do to with such information, but maybe a few developers here would)
DoubleHP
Posts: 15
Joined: Sun Mar 05, 2017 6:11 pm

Re: Loading image produces grey rectangle

Post by DoubleHP »

NormandC give me commands, I will paste outputs.

I would not complain, because, FreeCAD was installed via NIX, so, NIX could be compiled for a version of X very different from the one I actually have.

What surprises me is that pictures work in some interfaces, and, in the classic 3D view, wire views work just fine.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Loading image produces grey rectangle

Post by NormandC »

I'm not a pro with terminal commands but these should provide some info:

Code: Select all

lspci | grep "VGA"
glxinfo | grep "OpenGL"
You may need to install an additional package for glxinfo, on Debian/Ubuntu it is provided by the mesa-utils package.
DoubleHP wrote:FreeCAD was installed via NIX
What's NIX?
DoubleHP
Posts: 15
Joined: Sun Mar 05, 2017 6:11 pm

Re: Loading image produces grey rectangle

Post by DoubleHP »

Code: Select all

501# lspci | grep "VGA"
01:05.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RS880 [Radeon HD 4200]
02:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV710 [Radeon HD 4350/4550]
03:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV710 [Radeon HD 4350/4550]
502# glxinfo | grep "OpenGL"
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: Mesa DRI R600 (RS880 9710) 20090101  TCL DRI2
OpenGL version string: 2.1 Mesa 7.9
OpenGL shading language version string: 1.20
OpenGL extensions:
    GL_ARB_depth_clamp, GL_ARB_depth_texture, GL_ARB_draw_buffers, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_fragment_program, 
    GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader, GL_ARB_imaging, 
    GL_ARB_multisample, GL_ARB_multitexture, GL_ARB_occlusion_query, 
    GL_ARB_pixel_buffer_object, GL_ARB_point_parameters, GL_ARB_point_sprite, 
    GL_ARB_provoking_vertex, GL_ARB_shader_objects, 
    GL_ARB_shading_language_100, GL_ARB_shadow, GL_ARB_shadow_ambient, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, 
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, 
    GL_ARB_texture_env_dot3, GL_MESAX_texture_float, 
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_rectangle, GL_ARB_transpose_matrix, 
    GL_ARB_vertex_array_bgra, GL_ARB_vertex_buffer_object, 
    GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos, 
    GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
    GL_EXT_blend_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
    GL_EXT_compiled_vertex_array, GL_EXT_convolution, GL_EXT_copy_texture, 
    GL_EXT_draw_range_elements, GL_EXT_framebuffer_object, GL_EXT_fog_coord, 
    GL_EXT_gpu_program_parameters, GL_EXT_histogram, GL_EXT_multi_draw_arrays, 
    GL_EXT_packed_depth_stencil, GL_EXT_packed_pixels, 
    GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, 
    GL_EXT_polygon_offset, GL_EXT_provoking_vertex, GL_EXT_rescale_normal, 
    GL_EXT_secondary_color, GL_EXT_separate_specular_color, 
    GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap, 
    GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D, 
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp, 
    GL_EXT_texture_env_add, GL_EXT_texture_env_combine, 
    GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic, 
    GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp, 
    GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, 
    GL_EXT_vertex_array, GL_EXT_vertex_array_bgra, GL_APPLE_packed_pixels, 
    GL_ATI_blend_equation_separate, GL_ATI_texture_env_combine3, 
    GL_ATI_texture_mirror_once, GL_ATI_separate_stencil, 
    GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip, 
    GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, 
    GL_MESA_pack_invert, GL_MESA_ycbcr_texture, GL_MESA_window_pos, 
    GL_NV_blend_square, GL_NV_depth_clamp, GL_NV_light_max_exponent, 
    GL_NV_packed_depth_stencil, GL_NV_texgen_reflection, 
    GL_NV_texture_rectangle, GL_NV_vertex_program, GL_OES_read_format, 
    GL_SGI_color_matrix, GL_SGI_color_table, GL_SGIS_generate_mipmap, 
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp, 
    GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
NIX is a way to install new softwares when your dep tree is broken in Debian or Gentoo. But NIX can be used in all distros, including MacOS and Windows. Since I am using X from Gentoo, and FreeCAD from NIX, my FreeCAD may be built for a recent X I don't have; but, images work in one case, and Wireframe in classic use, so ... I am puzzled.
Post Reply