Problem using 'websave'

2 次查看(过去 30 天)
Salad Box
Salad Box 2017-11-29
Hi
I'm using 'websave' to save an url into an image file.
Code as below:
url='http://www.clker.com/cliparts/Q/9/h/4/M/z/female-icon.svg'; filename='female.png'; outfile=websave(filename,url);
However, the saved image file can't be opened. The thumbnail looks like shown below.
However, if I open the url in the web browser and save it manually, I could actually save it as a .png file since it has this option shown in the screenshot below.
After saved it this way, the thumbnail looks something like below
So I wonder why 'websave' saved the image but the image couldn't be displayed properly. Because when I saved it manually it worked fine and I suppose 'websave' does the same job.
Could anyone help?
Many thanks.
  7 个评论
Guillaume
Guillaume 2018-3-26
I agree with Rik, the initial bug report is a non-bug. Just somebody not realising that right-clicking Save image as... is not the same at all as saving the original file.
As for the problem with the zip file, while bugs are always possible, the bulk of the work of websave is handed down to Java. It is very unlikely that there is a bug in the Java code. I would suspect that it may be some connection issues or possibly an incorrectly configured webserver.
Walter Roberson
Walter Roberson 2018-3-26
"It is not good that MathWorks is not following up on this question."
This resource, MATLAB Answers, is not an official MATLAB technical support site: it is a site for community members to help other community members. Mathworks does not read the questions (not unless someone opens a bug report and points them to the question.)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by