What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Pixels Randomly Moving When Placed on Another Image [Layer]


oarsout

Member
Messages
5
Likes
1
I created these number images in PhotoShop. They are 24px by 24px which includes a 2px red border. Sometimes when I place or drag them onto another image in Photoshop, they transfer over just fine. Other times one row (vertical or horizontal) of the red border randomly shift to the other side of the image. They don't become cropped or deleted, just moved. I am currently using v 22.5.1. Any ideas why this might be happening?

Numbers.png
 
Hi @oarsout

I have not seen this issue yet to debug your issue, if you could create a couple small psd files, zip them together and post them here with the "Attache File" button at the lower left of the post area, then forum members could try and duplicate the issue and report back if they see the same problem and possibly determine the root cause issue.

Note that what you see depends on your perception as well. I see a number 5 fixed in a white field and the number and whtie field is shifted around by a pixel. So probably not the red pixels jumping from one side to the other (just my guess yet still doesn't explain why that happens)

John Wheeler
 
Just curious - how many layers make up the number with the border?
Is the image merged so you have a single layer?
Are you dragging the image to a new document or copy/pasting the layer?
What is the resolution of the number layer document and the resolution of the document you are trying to copy it to?
Is it possible, along with what John has requested, to provide us a screen shot of your workspace?
 
I created these number images in PhotoShop. They are 24px by 24px which includes a 2px red border. Sometimes when I place or drag them onto another image in Photoshop, they transfer over just fine. Other times one row (vertical or horizontal) of the red border randomly shift to the other side of the image. They don't become cropped or deleted, just moved. I am currently using v 22.5.1. Any ideas why this might be happening?

View attachment 126478
@JeffK @thebestcpu I use an Action to place 20 images of numbers with a red boarder (each on its own layer) on the active image. The Action looks for the images in a folder that resides on the root (C:) drive. After placed, I can drag them into position and then delete the unused number icons. I have attached a zip file containing the Action, Tool Presets, image folder, and a psd file with the 20 images in place. Thanks so much for your help. Let me know if I can provide anymore information about this issue.
 

Attachments

Last edited:
@thebestcpu is far more technical than I am
But when looking at the number images, there were two things that caught my eye:

- the number images were saved in Index color while the document is RGB
- there seems to be a pixel grid outside the number box that is exactly where the image shifts when it is brought into the master document

1639606742191.png

I'm not sure if either of these is causing your image problems John will probably dig in deeper. But I'm just suspicious it's the way the boxed number images were created that's causing the issue.
There doesn't appear to be anything within the action that might cause it.

I'm as curious as you to hear from John...
 
Hi @oarsout and @JeffK
I did not look at the Action yet could reproduce the same issue just by trying to resize the Smart Object just a bit proportionally and since this is a very small pixel object, it does not always expand correctly. So I am assuming that Photoshop is indeed doing this and here is what I think you should try to see if this resolves your issue.

As a first step I would go into preferences and deselected the resize upon placing checkmark
Also, unless you really need it as a Smart Object (doubtful) also deselect the option that automatically creates a Smart Object when placing. Here is a cut and paste with arrow pointing to those options under the General Section:

Preferences.jpg

With those options unchecked, the objected should be placed exactly pixel per pixel without any attemplt to transform. That may resolve the issue.

A less likely issue is that the numbers are all in Index Color mode as Jeff indicated. Photoshop should convert that to RGB of the base image when placing yet if you still have trouble, change the individual numbers to RGB mode and see if that helps.

That's my best guess and I think worth a try before looking more deeply.
John Wheeler
 
Also, I forgot to mention that sometimes issues happen if the ppi setting for the iamges are difference. I believe they were the same for both you numbers and the overall image yet that could be an issue if they were at different ppi.
 
Hi @oarsout
Well, I tried several different approaches with my PS 2021 ver 22.5.3 and see the same problem by just using file > place embedded.
So I have not tracked down root cause.
Yet I tried it on PS 2019 ver 20.0.19 using the same images and downloaded numbers and I do not have the same problem.

So, the behavior on PS 2021 is different and seems wrong compared to what I see on PS 2019.
Offhand I would classify that as a bug and it would be worth reporting. None of my suggested work arounds worked for me when using File > Place embedded either. That does not mean a workaround is not available.

The previous feedback to Adobe has apparently been closed and they suggest going to the Adobe Community site to report the issue at:

https://community.adobe.com/

If I find anything else out I will add a post yet you have found some behavior that looks bad and prior versions do not have that issue.
You found a good one.

Hope this helps
John Wheeler
 
Hi @oarsout

Just to note that I could not test our your Action because it referred to specific file locations that are not on my computer. Yet my understanding from reading the Action steps in the Action Panel is that you are doing a Place embedded operation for all of the number files. I also did not understand the need for the Rectangular Marguee Toolset.

I was still assuming that the issue/bug had something to do with the placing of the file and PS not getting it right. I tried an experiment where I made you image have an even number of pixels in height and width as a long shot experiment. I was figuring that since the placement of the file is set to be in the center of the image, there is always the possibility that the errant code is having trouble with an odd pixel size and not splitting it correctly.

As a matter of fact, by creating the numbers and red border to be 22 x 22 pixels, the placement seemed to work correctly with the image showing up exactly correct. This has the potential for be a workaround for you issue to get around the bug.
Hope you give it a try and let us know it that helped the issue.

John Wheeler
 
I created these number images in PhotoShop. They are 24px by 24px which includes a 2px red border. Sometimes when I place or drag them onto another image in Photoshop, they transfer over just fine. Other times one row (vertical or horizontal) of the red border randomly shift to the other side of the image. They don't become cropped or deleted, just moved. I am currently using v 22.5.1. Any ideas why this might be happening?

View attachment 126478
Thanks, @JeffK and @thebestcpu! I made all of your recommended adjustments and found that the problem seems to have to do with odd pixel size and Photoshop's attempt to place it in the center of the image as you discovered, @thebestcpu. I changed the number images to 22 x 22; however, the issue wasn't resolved until I ALSO made the dimensions of the target image even numbers (998 x 730 in this case). I guess when there isn't a true center, Photoshop attempts to compensate. I'll be sure to report this bug. Do you know of an alternative to File > Place Embedded (that I can automate with an Action) or a way to change the placement position to something other than "center"? I really appreciate you both digging so deeply into this!
 
Thanks, @JeffK and @thebestcpu! I made all of your recommended adjustments and found that the problem seems to have to do with odd pixel size and Photoshop's attempt to place it in the center of the image as you discovered, @thebestcpu. I changed the number images to 22 x 22; however, the issue wasn't resolved until I ALSO made the dimensions of the target image even numbers (998 x 730 in this case). I guess when there isn't a true center, Photoshop attempts to compensate. I'll be sure to report this bug. Do you know of an alternative to File > Place Embedded (that I can automate with an Action) or a way to change the placement position to something other than "center"? I really appreciate you both digging so deeply into this!
Hi @oarout
Makes sense about having the width and height set to be able to position correctly. Still a bug in PS so thanks for following through with reporting that.

I think I have an alternative approach that can work yet it has a limitation. The approach I am going to mention below puts the number images in the upper left corner of the document. This approach also does not allow Smart Object so that is a limitation.

As far as making into an Action, I think you will have to try it out.

Another limitation for the approach below is that you start with only your base image open in Photoshop (others would be closed out or saved etc)

So here is your starting image which is just your base Layer

Screen Shot 2021-12-16 at 11.05.25 PM.jpg

Then you open a script via File > Scripts > Load Files into Stack

You choose Folders in the dropdown and click on browse and choose the folder that has all and only the Number Files and click Open

Screen Shot 2021-12-16 at 11.07.41 PM.jpg

This loads up all of the number files yet they are not yet in order.
Now click the Sort By Name button:

Screen Shot 2021-12-16 at 11.07.52 PM.jpg

The folders are now in order.
Next you click on Add Open Files and the only open file is the Background Image. Clicking this option will put that file at the bottom of the list of this script:

Screen Shot 2021-12-16 at 11.08.22 PM.jpg

Clicking OK for the Script will now create a new document with the background Layer at the bottom of the stack and all the number files on its each individual Layer in the upper left corner with #1 at the top of the Layer Stack and in succestion #2, #3, on down the Layer Stack

Screen Shot 2021-12-16 at 11.09.02 PM.jpg

I did not see any funny transformation issues wtih any of the number Layers.

I have not written an Action to see if there are any issues yet it does work manually.
Hope this works for you in an Action
John Wheeler
 
Last edited:
It becomes pixelated when the text layer is rasterized or it's just a drop shadow moved from another file with different size.
Text layers are vector based and scale preserving the quality unless rasterized.
 
Hi @oarout
Makes sense about having the width and height set to be able to position correctly. Still a bug in PS so thanks for following through with reporting that.

I think I have an alternative approach that can work yet it has a limitation. The approach I am going to mention below puts the number images in the upper left corner of the document. This approach also does not allow Smart Object so that is a limitation.

As far as making into an Action, I think you will have to try it out.

Another limitation for the approach below is that you start with only your base image open in Photoshop (others would be closed out or saved etc)

So here is your starting image which is just your base Layer

View attachment 126520

Then you open a script via File > Scripts > Load Files into Stack

You choose Folders in the dropdown and click on browse and choose the folder that has all and only the Number Files and click Open

View attachment 126522

This loads up all of the number files yet they are not yet in order.
Now click the Sort By Name button:

View attachment 126524

The folders are now in order.
Next you click on Add Open Files and the only open file is the Background Image. Clicking this option will put that file at the bottom of the list of this script:

View attachment 126525

Clicking OK for the Script will now create a new document with the background Layer at the bottom of the stack and all the number files on its each individual Layer in the upper left corner with #1 at the top of the Layer Stack and in succestion #2, #3, on down the Layer Stack

View attachment 126526

I did not see any funny transformation issues wtih any of the number Layers.

I have not written an Action to see if there are any issues yet it does work manually.
Hope this works for you in an Action
John Wheeler
Thanks so much, @thebestcpu. I haven't had a chance to try this yet but will see if I can execute it as an action. I'll let you know how I come out. Happy Holidays!
 

Back
Top