EBImage cannot read .png images from Image.R
1
0
Entering edit mode
benauxier • 0
@benauxier-13262
Last seen 7.4 years ago

Trying to use the annotation_image() function from ggtree package, which was working before, but is not working currently. The error message I get is:

Error in FUN(X[[i]], ...) :
  Invalid type: png". Currently supported formats are JPEG, PNG, and TIFF.

I tracked this to the Image.R script from EBImage, and it looks like it is coming from the determineFileType() function, since it is returning png" (note the single parentheses?). I am wondering if anyone knows anything about this?

The versions I am using are ggtree 1.8.1, EBImage 4.18.0, R 3.4.0

ebimage ggtree • 2.0k views
ADD COMMENT
1
Entering edit mode

Can you please post

  • a (minimal) code example
  • make sure you use recent package versions, and provide the output of devtools::session_info() ?
ADD REPLY
0
Entering edit mode
Andrzej Oleś ▴ 750
@andrzej-oles-5540
Last seen 4.0 years ago
Heidelberg, Germany

Your description indicates a problem with either the input filename or downstream package functions calling EBImage functions. The quotation mark in the error message looks suspicious indeed, as it suggests that the filename passed to readImage wrongly contains a quotation mark, i.e. filename.png". It is unlikely that any recent update to EBImage could be the cause, as the relevant parts of code in Image.R haven't been touched for the last few releases.

Cheers,

Andrzej

ADD COMMENT

Login before adding your answer.

Traffic: 540 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6