Guys
I need to compare 2 png images A and B. Identical number of pixels. If pixel(x,y) from A is lighter(whiter) than B, then move A to B.
I did search the board, nothing came up.
Is there a script for this?
Many thanks
Compare pixels
Re: Compare pixels
Upload examplary files to compare.
- Stephen_A_Marsh
- Posts: 38
- Joined: Sun Aug 04, 2019 12:37 pm
Re: Compare pixels
Layer the file that may have lighter pixels over the other file (2 layers). In the upper layer file, set the blend mode to lighten. Merge or flatten the layers.
-
Saskia_Casper
- Posts: 1
- Joined: Thu Apr 16, 2026 12:39 pm
Re: Compare pixels
That sounds like a tricky scripting challenge. When you're dealing with specific layer adjustments or blending modes in Photoshop via script, it’s often those small differences in DOM versions that cause the unexpected behavior.
If you’re still seeing inconsistencies with how the layers are being targeted, it might be worth running a quick check on the layer properties or the file structure itself before the script executes. I’ve found that using a dedicated metadata or file info utility can sometimes catch hidden layer attributes or color profile issues that the script engine doesn't always report clearly. Checking the file integrity first often saves a lot of time debugging the actual code.
If you’re still seeing inconsistencies with how the layers are being targeted, it might be worth running a quick check on the layer properties or the file structure itself before the script executes. I’ve found that using a dedicated metadata or file info utility can sometimes catch hidden layer attributes or color profile issues that the script engine doesn't always report clearly. Checking the file integrity first often saves a lot of time debugging the actual code.
-
Zyarareaa2
- Posts: 1
- Joined: Wed Apr 29, 2026 6:45 am
- Location: https://melonplaygroundgame.org/
Re: Compare pixels
even a correctly written script can behave unpredictably if there are hidden factors in the file—such as layer properties, blending modes, metadata, or color profiles—that the scripting engine doesn’t fully expose or interpret consistently. These subtle differences can lead to incorrect layer targeting or unexpected results.Saskia_Casper wrote: ↑Thu Apr 16, 2026 12:43 pm That sounds like a tricky scripting challenge. When you're dealing with specific layer adjustments or blending modes in Photoshop via script, it’s often those small differences in DOM versions that cause the unexpected behavior.
If you’re still seeing inconsistencies with how the layers are being targeted, it might be worth running a quick check on the layer properties or the file structure itself before the script executes. I’ve found that using a dedicated metadata or file info utility can sometimes catch hidden layer attributes or color profile issues that the script engine doesn't always report clearly. Checking the file integrity first often saves a lot of time debugging the actual code.