Login  Register

Re: Saved image includes Pixel Inspection Tool marker

Posted by J. Lewis Muir-2 on Feb 13, 2020; 2:29pm
URL: http://imagej.273.s1.nabble.com/Saved-image-includes-Pixel-Inspection-Tool-marker-tp5022932p5022936.html

On 02/13, Herbie wrote:
> I've just tested it (IJ-version 1.52t) and realized that the selected area
> is in fact an overlay. When saving images with overlays in JPG- or
> PNG-format, they are flattened, i.e. the overlay is imprinted onto the
> image. This behavior isn't a bug.
>
> What you can do, if you don't like the red square being imprinted, is go to
> "Image >> Overlay >> Remove Overlay".

Hello, Herbie!

Thank you for your reply!  I confirm that choosing Image > Overlay >
Remove Overlay removes the red box, even with the Pixel Inspection Tool
selected and results in a clean image without the red box when saved as
PNG.

I still feel that this is a bug, though.  If it's not a bug, then it's
at least really surprising and confusing behavior, IMO.  All I did
was create a new image and use the Pixel Selection Tool to inspect a
pixel.  I never created an overlay or did anything with an overlay.  It
is very unexpected to me that saving an image would result in an image
containing the graphical cursor from an inspection tool I happened to
use.  It would almost be like leaving my mouse cursor hovering over
the image and then saving the image only to discover that the mouse
cursor had been saved in the image as if I had taken a screenshot of the
window.  I really don't see how this is reasonable behavior.

Now, if I had instead chosen, e.g., the Text Tool, entered some text,
and then had chosen Edit > Draw, then I could see this behavior as
reasonable.  But for an inspection tool like the Pixel Inspection Tool,
it just makes no sense that the cursor for the tool would be saved in
the image.

I had a look at the Magnifying Glass Tool to see if it has the same
behavior as the Pixel Inspection Tool, and it does not.  I selected the
Magnifying Glass Tool, zoomed in to 300%, and it displayed two purple
boxes in the top-left corner.  I then chose File > Save As > PNG, and
the resulting image does *not* include the purple boxes.  This seems
entirely reasonable and is what I would expect.

Thank you!

Lewis

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html