Having trouble opening picture with imagej

open%20pic%20problem

I am having trouble opening an image with imagej that I want to be analyzed. I am receiving this error message that I have attached even though the image is saved as a .bmp file.
How do I fix this?

Thanks

It would help if you could upload the .bmp file that won’t open in ImageJ.

Cap00.bmp (225.1 KB)

here is the .bmp file

I can open this file on macOS and Windows by dragging and dropping it on the main ImageJ window.

there are two macros that I am trying to use for this picture. The first one is two open and convert the image to 8 bit. The second is to analyze the particles. Would you like for me to send these?

When you write that you can’t open the file with imageJ, did you try to open using drag and drop or is it trying to open through the macro? Drag and drop works for me (PC, Win10, imageJ 1.50i) and @Wayne .

The filename in the error message is different from that of the file you shared with us. It might be that either the file in the error mesage is bad.
Another explanation can be that you try to access the wrong filepath (e.g. hardcoded into macro for another computer / files have been moved etc.).

Are you able to open this file using drag and drop? If you get the error when using the open() function in a macro then it is likely that the file path is incorrect. You can generate code to open an image by using the File>Open command with the recorder (Plugins>Macros>Record) running. This what I get when I open your image on Windows 10:

open("C:/Users/rasba/Downloads/Cap00.bmp")

1 Like

I sometimes got the same error when I tried calling open("file.tif"); in a macro, because I didn’t specify the folder where the file is located. @lumbee15 Is the image located in the folder specified in the error message?

Cheers,
Robert

1 Like

Open and Convert.txt (137 Bytes) LB1 Left.txt (204 Bytes)

I have attached the two macros that I am trying to run. First I want to use the open and convert macro to open the image and convert it to 8-bit. Then I want to analyze the image using the LB1 left macro. However I still cannot get this to work. Please let me know what you think my next step should be. The image I am trying to open is the one I sent earlier. I made sure the file path was correct in the open and convert macro for the image.

Both scripts seem to work for me. I ran your open and convert macro (changing path to where I saved the image) and it opens and auto-thresholds just fine. The LB1 script also runs just fine.
Not sure what could be the issue.

Can it be an issue of user rights? E.g. you are working on a computer with restricted access so imageJ is not allowed to access any files/files in certain locations? (Not sure if this has anything to do with imageJ, just brainstorming.)