Cody

Problem 699. Reading Web Binary Files (jpg,pdf,tiff,png)

Solution 2941555

Submitted on 13 Sep 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
% Cody External accessibility % This file may need to change in the future in_f='http://www.pvplc.org/_volunteer/docs/PVPLC%20Trail%20Crew%20Training%20Jan-Jun%202012.pdf'; out_f='PVPLC.pdf'; urlwrite(in_f,out_f); fid=fopen(out_f); urlwrite_out=fread(fid,128,'*uint8'); % Display Correct Binary Data urlwrite_out(1:16)' block=urlread(in_f); % Display invalid binary data urlread_out=block(1:16)-char(0) % unicode urlread conversion affects bytes 12 thru 15 n=12 byte_val = access_web_pdf(in_f,n) byte_correct=181; assert(isequal(byte_val,byte_correct))

Error using urlreadwrite (line 98) Error downloading URL. Your network connection may be down or your proxy settings improperly configured. Error in urlwrite (line 52) [f,status] = urlreadwrite(mfilename,catchErrors,url,filename,varargin{:}); Error in Test1 (line 8) urlwrite(in_f,out_f);

Suggested Problems

More from this Author241

Community Treasure Hunt

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

Start Hunting!