Removing white axes border around image GUI
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I Have a problem when coding my GUI i read an image file after pressing the LOAD button and try to insert the image into the axes but cant get rid of the white border around it, any suggestions?
1 comentario
Respuestas (1)
Vinayak Choyyan
el 12 de Abr. de 2023
Hi Mikolaj,
As per my understanding, you are using ‘uiimage’ of MATLAB App Designer and facing an issue with a white background when loading new images into the ‘uiimage’.
To resolve the issue you are facing, you can try out any of the following solutions:
- Set the ‘BackgroundColor’ property of ‘uiimage’ to ‘none’. To know more about ‘BackgroundColor’ property, please refer to this documentation page https://www.mathworks.com/help/matlab/ref/matlab.ui.control.image-properties.html#mw_03d5d287-464f-41e1-91de-cf8db63135c7. You can also change the background color to match the app background color.
- By default, the ‘ScaleMethod’ property of ‘uiimage’ is set to ‘fit’. Change this property to hide the background color as per your use case. To know more about ‘ScaleMethod’ property, please refer to this documentation page https://www.mathworks.com/help/matlab/ref/matlab.ui.control.image-properties.html#mw_f8a05f7c-9b7a-45c0-87dc-cc44b6c16b36_sep_mw_987a59d0-ad6c-4838-b9bc-afa9465b666e
- Adjust the ‘Position’ property of ‘uiimage’ to match the image’s size. To know more about ‘Position’ property, please refer to this documentation page https://www.mathworks.com/help/matlab/ref/matlab.ui.control.image-properties.html#mw_93260cd1-c3dd-40a8-942d-41a75a301966
I hope this resolves the issue you are facing.
0 comentarios
Ver también
Categorías
Más información sobre Image Preview and Device Configuration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!