Image > Scale... not working properly

Hello,

To reproduce the issue I’m having, open any image, e.g. blobs (Ctrl+Shift+B). Now, run Image > Scale… with X and Y Scale = 2, and uncheck “Create new window”.

This zooms the image 2 times but the image size does not change (why?), leading to image loss at the boundary.

I’m getting correct results with the “Create new window” checked.

Let me know if you can not reproduce this.

Thanks,

Ved

1 Like

Hi @vedsharma,

thanks for letting us know. I can reproduce this. But I’m afraid this is not a bug but rather a feature. I also checked with ImageJ 1.12 (a 19 year old version) and it does the same. It apparently has always been like this.

Why do you consider this as a bug?

Thanks!

Cheers,
Robert

1 Like

Thanks for your reply Robert!

The reason I find it confusing is because, when I enter 2 for X and Y scales, the values in the Width and Height boxes automatically increase to double the values, giving an impression that the resulting window, after I press OK, will be double the size of the original image. But, that’s not the case if “Create new window” is unchecked.

Intuitively, toggling “Create new window” ON/OFF should give identical results, whether in a new window (ON) or in the same window (OFF).

Not a big deal for me and wouldn’t really want to break anything if this is how this command worked for the last 19+ years :slight_smile: I can always check “Create new window” to get the bigger image and close the original image.

Ved

1 Like

Another thing I noticed is that the spatial calibration (pixel to um) is not maintained with “Create new window” unchecked.

Ved

Hey again @vedsharma.

I just tried and to me it totally makes sense, what ImageJ is doing:

I mean, the image is zoomed; thus to maintain the real object size, the pixel size must change. Do you agree?

Cheers,
Robert

Exactly, but the pixel size is not changing if you keep the “Create new window” box unchecked. Screenshot below:

Ved

3 Likes

Ah, you are right. That might be a bug.

@Wayne : Might there be a bug in the ij.plugin.Scaler class? It appears like it doesn’t update pixel size in case no new window is created…

Thanks a lot!

Cheers,
Robert

1 Like