Problem 699. Reading Web Binary Files (jpg,pdf,tiff,png)
The Challenge is to access a Web binary file, a PDF in this case, and provide the value of a specific byte.
.
Accessing files on the web provide multiple challenges due to the data structures being text or binary.
The functions urlread and urlwrite both access web files but provide different results for binary files. (jpg, pdf, tiff, png, ppt)
Input:
fname 'http://some valid location/file.pdf'
n The byte for which the value is being requested.
Output: Value of the byte, an integer ranging from 0 to 255
.
A solution exists in the test suite to show the different data created by urlread and urlwrite for binary data.
A urlreadbin can be readily created to directly push the file to an array.
Solution Stats
Problem Comments
-
1 Comment
This problems test suite wont work anymore as the url it points to doesnt exist anymore
Solution Comments
Show commentsProblem Recent Solvers11
Suggested Problems
-
Back to basics 25 - Valid variable names
324 Solvers
-
Find the largest value in the 3D matrix
1521 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
605 Solvers
-
Get the length of a given vector
10948 Solvers
-
Calculate the Hamming distance between two strings
323 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!