Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readJPEG does not seem to format messages properly #4

Open
Nova-Scotia opened this issue Aug 26, 2019 · 0 comments
Open

readJPEG does not seem to format messages properly #4

Nova-Scotia opened this issue Aug 26, 2019 · 0 comments

Comments

@Nova-Scotia
Copy link

Nova-Scotia commented Aug 26, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant