How to download image file from internet and display in UIAxes using MATLAB script in App Designer?
ฝัง
- เผยแพร่เมื่อ 6 ก.พ. 2025
- In this video it shows the steps to download an image file from the internet (https URL) and save it in the local PNG file.
In this video it uses sample images from the below webpage:
programmerworl...
And below are the respective images' URLs:
i0.wp.com/prog...
i0.wp.com/prog...
It uses WEBREAD command to read the data in a local MATLAB variable. Then it uses IMSHOW with parent set to UIAxes to display the image within the App window. It uses IMWRITE to save the image data in a local PNG file.
I hope you like this video. For any questions, suggestions or appreciation please contact us at: programmerworl... or email at: programmerworld1990@gmail.com
Complete source code and other details/ steps of this video are posted in the below link:
programmerworl...
However, the main code is copied below also for reference:
function ImageButtonPushed(app, event)
data = webread(app.URLEditField.Value);
imshow(data,'Parent',app.UIAxes);
imwrite(data, 'myImageFromInternet.png');
end
--