Reducing Halo Effect in Rescaled/Resized Images
Moderators: XnTriq, helmut, xnview
-
- Posts: 8
- Joined: Sat Jan 11, 2014 5:53 am
Reducing Halo Effect in Rescaled/Resized Images
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!
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!
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Reducing Halo Effect in Rescaled/Resized Images
Could you post a sample, Missletoss?
-
- Posts: 8
- Joined: Sat Jan 11, 2014 5:53 am
Re: Reducing Halo Effect in Rescaled/Resized Images
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.)
Any advice appreciated, thank you again!
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.)
Any advice appreciated, thank you again!
You do not have the required permissions to view the files attached to this post.
-
- Posts: 8
- Joined: Sat Jan 11, 2014 5:53 am
Re: Reducing Halo Effect in Rescaled/Resized Images
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.
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Reducing Halo Effect in Rescaled/Resized Images
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?
BTW: Do you use the lastest version (1.60) of XnConvert?
- Stack Exchange
- Robin Wood
- Timm Dapper
- Alpha Blending for Leaves (Photoshop)
- Unity3D
- How do I Import Alpha Textures? (Photoshop)
- Corel User to User Web Board
- Paint.NET Forum
- GIMP Chat
- ImageMagick
- Jason Summers
- ImageWorsener
- Resizing images with transparency
- “Clamping” intermediate samples » Clamping and transparency
- ImageWorsener
- vbAccelerator
- XnView Forum
-
- Posts: 8
- Joined: Sat Jan 11, 2014 5:53 am
Re: Reducing Halo Effect in Rescaled/Resized Images
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.
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.
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Reducing Halo Effect in Rescaled/Resized Images
If you have Photoshop, the well-documented actions provided by Robin Wood will save you a lot of work.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.
-
- Posts: 8
- Joined: Sat Jan 11, 2014 5:53 am
Re: Reducing Halo Effect in Rescaled/Resized Images
Thanks! I may have to do that at some point if I can't find another work around. I'm using SAI unfortunately.
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Reducing Halo Effect in Rescaled/Resized Images
Did you resize by pixels or percentage?Missletoss wrote:And yes, it was a reduction in size.
- Input: mouth1.png (2000×3000 px)
- Output: mouth2.png (526×790 px)
Systemax PaintTool SAI?Missletoss wrote:I'm using SAI unfortunately.
Sorry I couldn't be any more helppng-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
We really need a solution. Even the official icon for XnView Classic has this effect:
-
- Posts: 8
- Joined: Sat Jan 11, 2014 5:53 am
Re: Reducing Halo Effect in Rescaled/Resized Images
By pixels.Did you resize by pixels or percentage?
Input: mouth1.png (2000×3000 px)
Output: mouth2.png (526×790 px)
Yes, that's what I'm using.Systemax PaintTool SAI?
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!Sorry I couldn't be any more help
We really need a solution. Even the official icon for XnView Classic has this effect:
I'll try that, but not sure what I do with it after that to get it transparent again?How about extracting the alpha channel and resizing it separately?
-
- Posts: 8
- Joined: Sat Jan 11, 2014 5:53 am
Re: Reducing Halo Effect in Rescaled/Resized Images
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.
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.
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Reducing Halo Effect in Rescaled/Resized Images
Hi again (-:
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:
Can you confirm that the Keep ratio checkbox for the Resize action has no effect in v1.60 of XnConvert for Windows?Missletoss wrote:By pixels.XnTriq wrote:Did you resize by pixels or percentage?
- Input: mouth1.png (2000×3000 px)
- Output: mouth2.png (526×790 px)
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.Missletoss wrote:I'll try that, but not sure what I do with it after that to get it transparent again?XnTriq wrote:How about extracting the alpha channel and resizing it separately?
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
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)
You do not have the required permissions to view the files attached to this post.
-
- Posts: 8
- Joined: Sat Jan 11, 2014 5:53 am
Re: Reducing Halo Effect in Rescaled/Resized Images
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.
Wow! The test results are really interesting. It seems like there is a very wide range in terms of what programs will do.
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Reducing Halo Effect in Rescaled/Resized Images
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:The Keep Ratio button does work. When I click it, it the image will stretch or not accordingly. Is that what you mean?
Right, especially in those cases where the same algorithm is usedMissletoss wrote:Wow! The test results are really interesting. It seems like there is a very wide range in terms of what programs will do.
-
- Moderator & Librarian
- Posts: 6387
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: Reducing Halo Effect in Rescaled/Resized Images
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)
- View » Show Mask
- View » Use alpha channel on
- View » Use alpha channel off
You do not have the required permissions to view the files attached to this post.