Issue with Dark Pixels in Transparent Resize (Raster)
Moderator: Kathy_9
-
pspuser22
- Posts: 12
- Joined: Sun Jan 23, 2022 12:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP Ultimate 2019
Issue with Dark Pixels in Transparent Resize (Raster)
Lately whenever i am resizing a transparent image it is applying a hue to the transparent pixels
- I have no Alpha Channels
- I have tried all the different resize formulas
- it has nothing to do with the shadow effect on the opposite side, as the layer is merged before resizing
Original File (Shown for comparison with white background) After 60% Resize, shown with separate white background layer for clarity only, second image with shadow layer remove prior to resize to per-emptively demonstrate that is not relevant These dark pixels surrounding the leg should not be there. There were never any dark pixels there to begin with just a white outline. Why is PSP putting Dark Pixels around any image I resize? What else to try?
The images are shown with a white background only so you can see the rogue pixels. I merge all visible layers before resizing and the primary image is on a transparent background. As you can see before resizing the border to the transparent section contains only white pixels of varying transparency. After resize, however, they become darker as if the transparency % is converted to a white-black scale percentage for some reason
This behaviour persists around restarts
Of course, if i merge all layers to a white background before resizing then this doesnt happen and the white blends seemlessly - but then the image is no longer transparent which is the whole point.
- I have no Alpha Channels
- I have tried all the different resize formulas
- it has nothing to do with the shadow effect on the opposite side, as the layer is merged before resizing
Original File (Shown for comparison with white background) After 60% Resize, shown with separate white background layer for clarity only, second image with shadow layer remove prior to resize to per-emptively demonstrate that is not relevant These dark pixels surrounding the leg should not be there. There were never any dark pixels there to begin with just a white outline. Why is PSP putting Dark Pixels around any image I resize? What else to try?
The images are shown with a white background only so you can see the rogue pixels. I merge all visible layers before resizing and the primary image is on a transparent background. As you can see before resizing the border to the transparent section contains only white pixels of varying transparency. After resize, however, they become darker as if the transparency % is converted to a white-black scale percentage for some reason
This behaviour persists around restarts
Of course, if i merge all layers to a white background before resizing then this doesnt happen and the white blends seemlessly - but then the image is no longer transparent which is the whole point.
-
Jean-Luc
- Advisor
- Posts: 2177
- Joined: Sat Oct 22, 2011 10:50 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ASUS Computer N751J
- processor: Intel i7_4710 HQ 2_50GHz
- ram: 16GB
- Video Card: NVIDIA GeForce GTX 850M
- sound_card: NVIDIA High Definition Audio
- Hard_Drive_Capacity: 2 Tb
- Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
- Corel programs: PSP X7, X9, 2018 to 2023
- Location: Belgium (French speaking)
- Contact:
Re: Issue with Dark Pixels in Transparent Resize (Raster)
Could you post the REAL original file (with transparency)?
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Alienware M17xR4
- processor: Intel Core i7-3630QM CPU - 2_40GH
- ram: 6 GB
- Video Card: NVIDIA GeForce GTX 660M
- sound_card: Sound Blaster Recon3Di
- Hard_Drive_Capacity: 500GB
- Corel programs: PSP: 8-2023
- Location: USA
Re: Issue with Dark Pixels in Transparent Resize (Raster)
I too would like to see the original file. Or at least know how big the original image was. And how big you're scaling it up?
Also did you try the pick tool? Or just Image -> Resize?
My initial thought is that technically in PSP fully transparent pixels do still have a color. It's 0, 0, 0. So maybe it's sampling and creating an intermediary color from that. But I don't know that's what's happening. I would need to be able to recreate the steps.
Also did you try the pick tool? Or just Image -> Resize?
My initial thought is that technically in PSP fully transparent pixels do still have a color. It's 0, 0, 0. So maybe it's sampling and creating an intermediary color from that. But I don't know that's what's happening. I would need to be able to recreate the steps.
https://levifiction.wordpress.com/
-
pspuser22
- Posts: 12
- Joined: Sun Jan 23, 2022 12:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP Ultimate 2019
Re: Issue with Dark Pixels in Transparent Resize (Raster)
Any size. Literally any size. Any resize results in artifacts like this in PSP 2019 Ultimate only. I'm not generally making massive resizes generally taking something in the 800-2000 pixels wide range and reducing to 400-800 range. The original exemplar was a reduction of about 65% from a 750px startLeviFiction wrote: ↑Sun Jan 23, 2022 9:19 pm I too would like to see the original file. Or at least know how big the original image was.
I've attached a simple circle (originally a vector) which i converted to raster and resized. It caused the artifacts just the same. You can see the exact artifacts in the second file.
I'm not scaling it up. I'm scaling it down. Which makes it even more baffling. Losses are expected when scaling up.
Resizing with the pick tool actually doesn't produce the artifacts and does result in clean white edges, only Image -> Resize does. So - thanks for the suggestion - However, resizing with the pick tool results in lower quality preservation of the original image particularly below 500pixels or so (It seems to lean more towards a pixel resize then a smarter, smoother resize at that point) so at this point i'm just using any common freeware paint program to resize which is annoying but better than having artifactsLeviFiction wrote: ↑Sun Jan 23, 2022 9:19 pm Also did you try the pick tool? Or just Image -> Resize?
- Attachments
-
- articfacts.7z
- (64.1 KiB) Downloaded 54 times
-
Jean-Luc
- Advisor
- Posts: 2177
- Joined: Sat Oct 22, 2011 10:50 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ASUS Computer N751J
- processor: Intel i7_4710 HQ 2_50GHz
- ram: 16GB
- Video Card: NVIDIA GeForce GTX 850M
- sound_card: NVIDIA High Definition Audio
- Hard_Drive_Capacity: 2 Tb
- Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
- Corel programs: PSP X7, X9, 2018 to 2023
- Location: Belgium (French speaking)
- Contact:
Re: Issue with Dark Pixels in Transparent Resize (Raster)
I see it too. Same behavior in PSP 2022.
The only way to get rid of is to use Pixel Resize.
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
-
pspuser22
- Posts: 12
- Joined: Sun Jan 23, 2022 12:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP Ultimate 2019
Re: Issue with Dark Pixels in Transparent Resize (Raster)
Incredible. Clearly this is a major bug with PSP resizing how does it go unnoticed? Freeware browser based editors don't even have this issue and i know earlier versions of PSP were ok. I was using one of the X variants previously with little issue though it may have been older than the ones you have installed
Obviously Pixel resize is not good because it creates bad borders
Obviously Pixel resize is not good because it creates bad borders
-
Jean-Luc
- Advisor
- Posts: 2177
- Joined: Sat Oct 22, 2011 10:50 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ASUS Computer N751J
- processor: Intel i7_4710 HQ 2_50GHz
- ram: 16GB
- Video Card: NVIDIA GeForce GTX 850M
- sound_card: NVIDIA High Definition Audio
- Hard_Drive_Capacity: 2 Tb
- Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
- Corel programs: PSP X7, X9, 2018 to 2023
- Location: Belgium (French speaking)
- Contact:
Re: Issue with Dark Pixels in Transparent Resize (Raster)
It seems that this is an old bug: the problem is visible in PSP X7 too.
I tested on PSP 8 (Jasc) and the behavior is correct (no grey pixels after reduction in Optimal mode).
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
-
pspuser22
- Posts: 12
- Joined: Sun Jan 23, 2022 12:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP Ultimate 2019
Re: Issue with Dark Pixels in Transparent Resize (Raster)
I was previously using X4 I believe without issue. How do we get this resolved?
-
JoeB
- Posts: 2778
- Joined: Fri Mar 28, 2008 10:04 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: LENOVO 4524PE4 ThinkCentre M91p
- processor: 3.10 gigahertz Intel Quad Core i5-2400
- ram: 8 GB
- Hard_Drive_Capacity: 4.6 TB
- Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
- Location: Canada
Re: Issue with Dark Pixels in Transparent Resize (Raster)
I notice that this has been about dark pixels around the edges of transparent images when resizing. Has this bug any effect or cause any issues with non-transparent layers/images resized down?
Regards,
JoeB
Using PSP 2019 64bit
JoeB
Using PSP 2019 64bit
-
pspuser22
- Posts: 12
- Joined: Sun Jan 23, 2022 12:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP Ultimate 2019
Re: Issue with Dark Pixels in Transparent Resize (Raster)
I haven't noticed any, with a merged background and no transparency resizing is fine
-
pspuser22
- Posts: 12
- Joined: Sun Jan 23, 2022 12:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP Ultimate 2019
Re: Issue with Dark Pixels in Transparent Resize (Raster)
So is the thought that there is just no solution to this, PSP is simply broken and the only way around it is to use a different program other than PSP?
-
Kathy_9
- Site Admin
- Posts: 2896
- Joined: Tue Nov 30, 2010 12:44 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- processor: 8th Generation Intel Core i7 8700 3 20 GHz
- ram: 16GB
- Video Card: NVIDIA GeForce RTX 2060 [6 GB GDDR6 dedicated]
- sound_card: NVIDIA High Definition Audio
- Hard_Drive_Capacity: 2TB
- Monitor/Display Make & Model: HP EliteDisplay E243m 23.8-inch
- Corel programs: PSPX2 ~2023; Painter 2018~23
- Location: USA
- Contact:
Re: Issue with Dark Pixels in Transparent Resize (Raster)
Since this is a user to user forum we could only offer speculation as to whether this will be fixed. Your best bet since this seems to be a show-stopper for your workflow would be to contact Corel directly and report the bug. https://www.corel.com/en/support/#corel
PSPX9 | PSP2020 | PSP2021| PSP2022 | PSP2023 & PhotoMirage installed; PSPX | PSPX2 thru PSP2019 owned but not installed
http://www.flickr.com/photos/37153430@N03/
http://www.flickr.com/photos/37153430@N03/
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Alienware M17xR4
- processor: Intel Core i7-3630QM CPU - 2_40GH
- ram: 6 GB
- Video Card: NVIDIA GeForce GTX 660M
- sound_card: Sound Blaster Recon3Di
- Hard_Drive_Capacity: 500GB
- Corel programs: PSP: 8-2023
- Location: USA
Re: Issue with Dark Pixels in Transparent Resize (Raster)
I do have a less-than-desirable option. But it should work most of the time.
The method is simple, and easily scripted to make it faster. In fact I'll include a script
1) Ctrl + A (Select All)
2) Ctrl + F (Float Selection)
3) Delete Floating Selection Layer (don't hit Delete key as that'll just clear the selection) Use the menu options Layers -> Delete or right-click the layer select Delete from the context menu
4) Make a mask from the selection: Layers -> New Mask Layer -> Show Selection
5) Select the original layer, invert the selection, fill with whatever color is most common around the edge.
5) You should now be able to resize without issue as the mask will handle the transparency portion.
Technically with other colors this probably doesn't come up all that often as a big deal because it would only make the edges slightly darker and only shows up to this extreme when decreasing in size.
The method is simple, and easily scripted to make it faster. In fact I'll include a script
1) Ctrl + A (Select All)
2) Ctrl + F (Float Selection)
3) Delete Floating Selection Layer (don't hit Delete key as that'll just clear the selection) Use the menu options Layers -> Delete or right-click the layer select Delete from the context menu
4) Make a mask from the selection: Layers -> New Mask Layer -> Show Selection
5) Select the original layer, invert the selection, fill with whatever color is most common around the edge.
5) You should now be able to resize without issue as the mask will handle the transparency portion.
Technically with other colors this probably doesn't come up all that often as a big deal because it would only make the edges slightly darker and only shows up to this extreme when decreasing in size.
- Attachments
-
- OpacityToMask.zip
- (530 Bytes) Downloaded 56 times
https://levifiction.wordpress.com/
-
pspuser22
- Posts: 12
- Joined: Sun Jan 23, 2022 12:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP Ultimate 2019
Re: Issue with Dark Pixels in Transparent Resize (Raster)
I'm not sure what to do with the script but on the surface, masking works when you are resizing a single color object. However its not a great workaround, and whenever you are working with a pre made or multi color selection its relatively useless.
There has to be an underlying cause as to why this software all of a sudden can't properly resize a raster selection. Its almost as if it is assuming the image is on a black background instead of a transparent background - but doing so within the mask layer so you only get the discoloration around the edges - and also why no discoloration occurs when resizing a square selection.
There has to be an underlying cause as to why this software all of a sudden can't properly resize a raster selection. Its almost as if it is assuming the image is on a black background instead of a transparent background - but doing so within the mask layer so you only get the discoloration around the edges - and also why no discoloration occurs when resizing a square selection.
-
pspuser22
- Posts: 12
- Joined: Sun Jan 23, 2022 12:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP Ultimate 2019
Re: Issue with Dark Pixels in Transparent Resize (Raster)
Actually I think i found the issue?
When PSP is resizing raster images and calculating the %Transparency of the new pixel, it is also applying that percentage to the RGB values for that pixel
So in this example you have a non-square image that is completely red (255,0,0). It has no anti-alias so every pixel is at 100% opacity.
Now, you resize the image 50%. Some of the pixels that used to be 100% opacity are now 50% opacity. That SHOULD BE the only change to the image. The opacity. The color should remain 255,0,0.
However, that is not what PSP is doing. PSP is for some reason also applying the new opacity value to the numerical RGB values. So the 50% pixel now has a color of 127,0,0 in RGB. Effectively, the more transparent a pixel becomes when resizing, it is also become more 'black'. This is why the effect is greatest when you have a light/white image as any resizing will have a noticeable ring around it of dark semi-transparent pixels that shouldn't be there, and never were before.
Is there a way to correct this calculation?
When PSP is resizing raster images and calculating the %Transparency of the new pixel, it is also applying that percentage to the RGB values for that pixel
So in this example you have a non-square image that is completely red (255,0,0). It has no anti-alias so every pixel is at 100% opacity.
Now, you resize the image 50%. Some of the pixels that used to be 100% opacity are now 50% opacity. That SHOULD BE the only change to the image. The opacity. The color should remain 255,0,0.
However, that is not what PSP is doing. PSP is for some reason also applying the new opacity value to the numerical RGB values. So the 50% pixel now has a color of 127,0,0 in RGB. Effectively, the more transparent a pixel becomes when resizing, it is also become more 'black'. This is why the effect is greatest when you have a light/white image as any resizing will have a noticeable ring around it of dark semi-transparent pixels that shouldn't be there, and never were before.
Is there a way to correct this calculation?
