Page 1 of 1
					
				Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 5:59 am
				by Missletoss
				Hi, I was wondering if there was a way to minimize or prevent halo effect from happening?
When I reduce .pngs to a smaller size (approximately 1/3 of the original size) I get a greyish, jagged halo effect around some of the more jagged areas of the image.  This happens for all the algorithms (I've tried Bilinear, Hanning, and everything in between.)    The .pngs, incidentally are images with transparent backgrounds.
The only algorithm that doesn't produce the halo is "Nearest Neighbor", but the image loses too much quality in that instance.
Any suggestions would be appreciated.  I don't know if changing any of the settings would help, but I certainly don't know enough about all the terminology or concepts to figure out which setting to change.
Thank you!
			 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 6:45 am
				by XnTriq
				Could you post a sample, Missletoss?
			 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 7:06 am
				by Missletoss
				Sure, thank you for the quick reply.
It's a bit hard to see, but these are a .png series of facial parts that will be layered over other images.  (look towards the center of the .pngs)
I reduced mouth1.png to mouth 2.png using Lanczos (and all the others had a similar result...the gray stuff around the edge of the small peach area.)
			
		
				
			 
- mouth2.png (4.41 KiB) Viewed 7943 times
 
Any advice appreciated, thank you again!
 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 7:08 am
				by Missletoss
				And yes, it was a reduction in size.  It might seem like I enlarged the .png but I think the forum automatically blows up the .pngs to whatever size fits the post.
			 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 8:30 am
				by XnTriq
				This problem is not unique to XnView/XnConvert. I'll try to find a workaround.
BTW: Do you use the lastest version (1.60) of XnConvert?
- Stack Exchange
- Robin Wood
- Eliminating “White Halos” in Second Life — Part #1 + #2 (Photoshop)
 
- Timm Dapper
- Unity3D
- Corel User to User Web Board
- Paint.NET Forum
- GIMP Chat
- ImageMagick
- Jason Summers
- vbAccelerator
- XnView Forum
 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 9:16 am
				by Missletoss
				Yes, I use 1.60.
Thank you for the links!
Right now I'll use "replace" color which sort of changes the image but at least gets rid of some of the grey.  
I'd probably just hand paint the smaller .pngs, but I have over a hundred images like this that need to be resized.
Thank you again!  I appreciate your help.
			 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 9:30 am
				by XnTriq
				Missletoss wrote:I'd probably just hand paint the smaller .pngs, but I have over a hundred images like this that need to be resized.
If you have Photoshop, the well-documented 
actions provided by Robin Wood will save you a lot of work.
 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 9:36 am
				by Missletoss
				Thanks! I may have to do that at some point if I can't find another work around.  I'm using SAI unfortunately.
			 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 12:45 pm
				by XnTriq
				Missletoss wrote:And yes, it was a reduction in size.
Did you resize by pixels or percentage?
- Input: mouth1.png (2000×3000 px)
- Output: mouth2.png (526×790 px)
Missletoss wrote:I'm using SAI unfortunately.
Systemax PaintTool SAI?
png-halo-remove wrote:Command line tool / API to remove the "White Halo" Artifact on Transparent PNGs saved by programs such as Adobe Photoshop. (White are halos noticeable when an image is resized with linear filtering, this program will smear the border color out on fully transparent-pixels)
Currently only works on 32-bit (RGBA) PNG files
 
Sorry I couldn't be any more help 

We really need a solution. Even the official icon for XnView Classic has this effect:
How about extracting the alpha channel and resizing it separately?
 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 8:55 pm
				by Missletoss
				Did you resize by pixels or percentage?
Input: mouth1.png (2000×3000 px)
Output: mouth2.png (526×790 px)
By pixels.
Systemax PaintTool SAI?
Yes, that's what I'm using.
Sorry I couldn't be any more help 

We really need a solution. Even the official icon for XnView Classic has this effect:
I really appreciate all the replies so far!  I'm amazed this board is so helpful and quick in its replies, much more so than boards for commercial software!
How about extracting the alpha channel and resizing it separately?
I'll try that, but not sure what I do with it after that to get it transparent again?
 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sat Jan 11, 2014 11:57 pm
				by Missletoss
				Just an FYI:
After fiddling with various options, I followed one of your links to ImageMagick above, which seems to be the only program that somehow seems to have fixed the halo resizing problem internally (not sure how).  
I love xnconvert though and I don't like using the command prompt, so I'm hoping to return to xnconvert at some point!  It works amazingly well for everything else.  

 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sun Jan 12, 2014 8:30 pm
				by XnTriq
				Hi again (-:
Missletoss wrote:XnTriq wrote:Did you resize by pixels or percentage?
- Input: mouth1.png (2000×3000 px)
- Output: mouth2.png (526×790 px)
 
By pixels.
 
Can you confirm that the 
Keep ratio checkbox for the 
Resize action has 
no effect in v1.60 of XnConvert for Windows?
Missletoss wrote:XnTriq wrote:How about extracting the alpha channel and resizing it separately?
I'll try that, but not sure what I do with it after that to get it transparent again?
 
XnConvert lets you extract the RGBA channels of 32-bit PNGs. As it turns out, only NConvert (the command-line version) can load/merge an alpha channel mask.
We'll have to wait & see what Pierre (the developer of everything Xn) says. In the meantime, I've done a few tests with the 
sample you've provided:
 Adobe Photoshop v6.0.1 (Bicubic) + fnord SuperPNG v1.1 Adobe Photoshop v6.0.1 (Bicubic) + fnord SuperPNG v1.1
  Corel Photo-Paint v11.633 SP2 Corel Photo-Paint v11.633 SP2
  Greenfish Icon Editor Pro v3.31 Greenfish Icon Editor Pro v3.31
  Human Balance GraphicsGale v1.93 Human Balance GraphicsGale v1.93
  Jasc Paint Shop Pro v9.01 (Smart) Jasc Paint Shop Pro v9.01 (Smart)
  Macromedia Fireworks v4.0.2 (Bicubic) Macromedia Fireworks v4.0.2 (Bicubic)
  PhotoFiltre v7.1.2 (Lanczos) PhotoFiltre v7.1.2 (Lanczos)
  Sib Icon Editor v4.00 (Lanczos3) Sib Icon Editor v4.00 (Lanczos3)
  ThumbsPlus v7.0 SP2 build 2251 ThumbsPlus v7.0 SP2 build 2251
  XnView v2.13 (Lanczos) XnView v2.13 (Lanczos)
 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sun Jan 12, 2014 9:01 pm
				by Missletoss
				The Keep Ratio button does work.  When I click it, it the image will stretch or not accordingly.  Is that what you mean?
Wow!  The test results are really interesting.  It seems like there is a very wide range in terms of what programs will do.
			 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sun Jan 12, 2014 9:15 pm
				by XnTriq
				Missletoss wrote:The Keep Ratio button does work.  When I click it, it the image will stretch or not accordingly.  Is that what you mean?
Yes, that's what I'm talking about. Thanks for checking. When 
Keep ratio is activated and I change the value for 
Width, the 
Height stays the same.
Missletoss wrote:Wow!  The test results are really interesting.  It seems like there is a very wide range in terms of what programs will do.
Right, especially in those cases where the same algorithm is used 

 
			
					
				Re: Reducing Halo Effect in Rescaled/Resized Images
				Posted: Sun Jan 12, 2014 10:15 pm
				by XnTriq
				Top to bottom:
- Adobe Photoshop v6.0.1 (Bicubic) + fnord SuperPNG v1.1
- Corel Photo-Paint v11.633 SP2
- Greenfish Icon Editor Pro v3.31
- Human Balance GraphicsGale v1.93
- Jasc Paint Shop Pro v9.01 (Smart)
- Macromedia Fireworks v4.0.2 (Bicubic)
- PhotoFiltre v7.1.2 (Lanczos)
- Sib Icon Editor v4.00 (Lanczos3)
- ThumbsPlus v7.0 SP2 build 2251
- XnView v2.13 (Lanczos)
Left to right:
- View » Show Mask
- View » Use alpha channel on
- View » Use alpha channel off