Page 1 of 1
Rotation changes the bit depth from 1bit to 8bit
Posted: Fri Sep 09, 2011 12:14 am
by dma_k
I have noticed that when I apply the rotation (
Image → Rotate → Custom) to the 1bit (binary) image, it is converted to 8bit. That is unexpected. Is rotation not possible for binary data? It should be even more simpler

Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Fri Sep 09, 2011 9:56 am
by DOS386
dma_k wrote:I have noticed that when I apply the rotation (Image → Rotate → Custom) to the 1bit (binary) image, it is converted to 8bit.
Right, 8 bit greyscale.
That is unexpected. Is rotation not possible for binary data? It should be even more simpler
Rotation of binary pixels is possible, but not interpolation ("Smooth"). If interpolation is desired, the image must be "upgraded". There is still a flaw BTW, the image should be upgraded to 16 bit
linear greyscale ... note that 8 bit linear greyscale is not feasible, and doing linear interpolation on 8 bit non-linear brightness is incorrect and causes unnecessary quality and brightness loss.
See
http://newsgroup.xnview.com/viewtopic.php?t=19897 why

Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Fri Sep 09, 2011 3:34 pm
by dma_k
DOS386 wrote:Rotation of binary pixels is possible, but not interpolation ("Smooth"). If interpolation is desired, the image must be "upgraded". There is still a flaw BTW, the image should be upgraded to 16 bit
linear greyscale ... note that 8 bit linear greyscale is not feasible, and doing linear interpolation on 8 bit non-linear brightness is incorrect and causes unnecessary quality and brightness loss.
See
http://newsgroup.xnview.com/viewtopic.php?t=19897 why

I am not sure, what you actually mean for interpolation ("smoothing") during the rotation... Could you be more verbose?
In any case, the image can be automatically converted back to binary after the rotation, right? So what do you think: the current behaviour is OK, or it can/should be improved?
Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Fri Sep 09, 2011 4:09 pm
by DOS386
not sure, what you actually mean for interpolation ("smoothing") during the rotation... Could you be more verbose?
Try to rotate (by 30 deg maybe) with and without "Smooth" ... check the results.
In any case, the image can be automatically converted back to binary after the rotation, right?
Sure, but this is a lossy conversion and might be usually a bad idea, so it's OFF for now ...
So what do you think: the current behaviour is OK, or it can/should be improved?
The point where I see an urgent need for improvement is to auto convert to 16bppc (thus 64 bpp total for RGBA) linear whenever necessary to do things right (zoom (except NN)), blur, rotate (except NN AKA "non-smooth"), trapez/barrel corrections (not implemented yet), ...). I see no point to keep 1 bpp binary on rotate (except 90 deg).
Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Sat Sep 10, 2011 7:30 pm
by XnTriq
dma_k wrote:I am not sure, what you actually mean for interpolation ("smoothing") during the rotation... Could you be more verbose?
Could you post an example, dma_k?
Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Mon Sep 12, 2011 9:44 am
by dma_k
DOS386 wrote:Try to rotate (by 30 deg maybe) with and without "Smooth" ... check the results.
I have made a try for
this image. I personally see no results for rotation without and with smoothing:
DOS386 wrote:
In any case, the image can be automatically converted back to binary after the rotation, right?
Sure, but this is a lossy conversion and might be usually a bad idea, so it's OFF for now ...
Perhaps that could be a preference option (
[x] Stay in the same color depth with rotating / zooming the image) or automatically stay in binary when smoothing is OFF?
XnTriq, thank you for links. I understand the principle of anliasing, but for me it makes sense only for non-binary images.
Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Mon Sep 12, 2011 3:10 pm
by xnview
Yes, to be able to make smooth rotation
Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Mon Sep 12, 2011 3:22 pm
by DOS386
Link is dead but rotate works for me, I do get results and they are different. Look better or count colours

Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Mon Sep 12, 2011 10:00 pm
by XnTriq
dma_k wrote:I personally see no results for rotation without and with smoothing:
That's because smoothing is
only applied to the preview thumbnail, even if
Apply to image is activated

You have to confirm with
OK to see the difference.
dma_k wrote:XnTriq, thank you for links. I understand the principle of anliasing, but for me it makes sense only for non-binary images.
Not all binary images are created equal

Please make a few experiments with
vision3d05.gif (from
Vision3D User Manual).
dma_k wrote:Perhaps that could be a preference option ([x] Stay in the same color depth with rotating / zooming the image) or automatically stay in binary when smoothing is OFF?
In my tests (30° clockwise w/o smoothing) the color depth of
Scan001.TIF was't increased

Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Thu Sep 15, 2011 3:26 pm
by dma_k
XnTriq wrote:In my tests (30° clockwise w/o smoothing) the color depth of
Scan001.TIF was't increased

Thank you! I have overlooked that if smoothing is off, then the color depth is not changing.
SOLVED
Re: Rotation changes the bit depth from 1bit to 8bit
Posted: Sat Sep 17, 2011 2:34 am
by Jaff
Not quite on topic: preview with smoth checked on non 90 degrees rotation show in preview (applied to image) 1 bit image but only when is pressed [OK] button is converted to 8 bit and show real rotated and smoothed image