You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been struggling with images that are "partially corrupted" - that is, part of the image is cut off by a large black or grey area (see example image, here). If I run "readJPEG" on this image like this:
img <- readJPEG("2017-08-30 00-17-42 M 1_5.JPG")
the output is:
JPEG decompression: Corrupt JPEG data: premature end of data segment.
As far as I can tell, this "message" is not actually a message or a warning, which makes it really difficult to do error checking or to capture that message or warning (for example, in tryCatch). For a more fulsome explanation of why this is troublesome, consider my question at stack overflow (here), if you're interested.
In any case, is it possible to change the function (or provide a similar one, like readJPEG2) that outputs that explanatory text as a message or warning?
The text was updated successfully, but these errors were encountered:
Hi Simon,
I've been struggling with images that are "partially corrupted" - that is, part of the image is cut off by a large black or grey area (see example image, here). If I run "readJPEG" on this image like this:
img <- readJPEG("2017-08-30 00-17-42 M 1_5.JPG")
the output is:
JPEG decompression: Corrupt JPEG data: premature end of data segment
.As far as I can tell, this "message" is not actually a message or a warning, which makes it really difficult to do error checking or to capture that message or warning (for example, in
tryCatch
). For a more fulsome explanation of why this is troublesome, consider my question at stack overflow (here), if you're interested.In any case, is it possible to change the function (or provide a similar one, like
readJPEG2
) that outputs that explanatory text as a message or warning?The text was updated successfully, but these errors were encountered: