Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

How do I move a Photoshop layer 1/2 pixel?

- - - - -

  • Please log in to reply
16 replies to this topic

#1
larryb123456

larryb123456

    Confused but Happy

  • Member
  • PipPipPipPipPip
  • 797 posts
  • Joined 10-August 10
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

I'm making a YouTube channel cover art for a friend and I need to move a rectangle by 1/2 pixel.

How do I do that? See the image below, and you'll understand why.

 

Thank you,

Larry

You_Tube_One_Channel_Coverart.png

_________________


new_MSFN_static_signature.jpg

 

" What we achieve inwardly will change outer reality."  Plutarch

 

 

 



How to remove advertisement from MSFN

#2
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 10,089 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Its been some time since I used photoshop... but do you not have the ability to type in the actual coordinates/dimensions of a selected object? This is a screenshot of such controls in Fireworks:

 

coords_zpsaf33cc39.jpg

 

Photoshop must have something similar. :unsure:


MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#3
larryb123456

larryb123456

    Confused but Happy

  • Member
  • PipPipPipPipPip
  • 797 posts
  • Joined 10-August 10
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Thanks, Trip. If it were that simple, I would have known the answer. I just PM'd CoffeeFiend about this. Is he still active?

 

I've also searched for an answer on the internet, but haven't been able to find anything helpful. There must be some way to do it, else the other Photoshop YouTube channel art designers wouldn't be able to accomplish this. I also posted this question on a Photoshop forum I belong to, but, as yet, haven't gotten a response.

 

Perhaps I missed something in my internet search. Since you're familiar with Photoshop, would you mind doing your own search, when you have time, to see what you can find? And then just give the links for the topics that seem to give the answer. Of course, you don't have to do this, because I know your time is valuable to you.

 

Thanks again,

Larry


Edited by larryb123456, 19 January 2015 - 11:21 AM.

new_MSFN_static_signature.jpg

 

" What we achieve inwardly will change outer reality."  Plutarch

 

 

 


#4
larryb123456

larryb123456

    Confused but Happy

  • Member
  • PipPipPipPipPip
  • 797 posts
  • Joined 10-August 10
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

@Tripredacus:

 

Thanks again. Is CoffeeFiend still active?

 

Does Fireworks open .psd files? I'm pretty sure it does. When I finish my YouTube channel cover art -- (it'll be at least a week or more, probably) -- can I send you my .psd file with 2 layers -- (the one in the middle with the graphics and the black background) -- and can you move the graphics layer 1/2 pixel so it is exactly centered, 508.5 px from top to bottom as in the diagram in my first post, and save it as a JPEG at the highest quality and mail it back to me? I can double check it with the measure tool. It's funny that in Photoshop, the measure tool, the ruler, can measure in small increments of pixels while the move tool only knows 1-pixel increments. To satisfy my curiosity, for you, what are the advantages of Fireworks over Photoshop? I use CS5, BTW.

 

Thanks again,

Larry


new_MSFN_static_signature.jpg

 

" What we achieve inwardly will change outer reality."  Plutarch

 

 

 


#5
dencorso

dencorso

    Iuvat plus qui nihil obstat

  • Supervisor
  • 6,194 posts
  • Joined 07-April 07
  • OS:98SE
  • Country: Country Flag

Donator

Is CoffeeFiend still active?

Yes. But on leave of absence. He checks back from time to time, so he may chime in sooner or later.

#6
uid0

uid0

    Advanced Member

  • Member
  • PipPipPip
  • 358 posts
  • Joined 12-June 06

Could you not scale it to double the resolution, move it 1 pixel, then sample it back down to the original size?



#7
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 10,089 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator



Could you not scale it to double the resolution, move it 1 pixel, then sample it back down to the original size?

 

That would be presuming that Photoshop would actually put the pixels where you want them to be. It would be worth a test, but you may end up with unwanted results.

 

Regarding my use of Fireworks, it comes down to my usage history. I had an "LE" version of Photoshop 5 originally, it came with some hardware I bought. I first got a Macromedia Suite license from college for version 2 software (Dreamweaver, Fireworks, Freehand, Director, Flash, etc) and then one for MX 2004. I had used Fireworks 2 along with the Photoshop 5 LE and found that (at that time) the only real difference was that Photoshop has filters. I basically ditched Photoshop and only have been using Fireworks MX 2004. I have since used newer versions of Photoshop through work, such as CS3 but my familiarity with Fireworks makes it my goto application.

 

Regarding PSD files, it does support *some* ... it is version dependent. You probably would want to stick with a parallel version. IDK if Fireworks is still included in the Creative Suite, it was in CS3. Send me a PM and I'll see what I can do.


MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#8
larryb123456

larryb123456

    Confused but Happy

  • Member
  • PipPipPipPipPip
  • 797 posts
  • Joined 10-August 10
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

@dencorso: Many thanks for always responding to my questions. I really appreciate it. You did it from day one, back about 4 1/2 years ago, and your input, in the many areas  in which we have communicated, has always added so much. I guess I'm just taking this opportunity to say, "Thanks for everything!"
-----------------------------------------------------------------------------------
@uid0: Thank you very much for your input! I did as you suggested, and it didn't work. For completeness, I'm showing what I did, just to make sure that I followed your suggestion correctly. Please tell me if I didn't. At a resolution of 72 pixels/inch, I made a Photoshop (PS) file with 2 layers: a gray 200x200px background layer and a red 200x51px rectangle on top. It's clear that for the red to be centered exactly on the gray, there needs to be (200-51)/2 =74.5px of gray above and below the red. Using the standard PS center command this is what I got:
 
original:

original.jpg
 
The red needs to be moved down 1/2px for it to be centered.

 

Then, I changed the resolution to 2x72=144 px/inch and moved the red down by 1 px. Then I changed the resolution back to 72 px per inch. I did that for 2 cases: #1 -- constraining proportions and #2 -- not constraining proportions. I got the same final result for both cases.
 

final:

final.jpg
 
What happened is that the red was stretched vertically by 1px, an undesired result, and was centered. But the interesting thing is that the top and bottom 1px of the red was not red, r,g,b=255,0,0, but became r,g,b=223,32,32.

 

Do you have any more ideas? If so, I'll happily try them. Thanks again for your input.
-----------------------------------------------------------------------------------

@Tripredacus: Thanks for your help. I think if/when I get the YouTube channel cover art done, I can save it as a JPEG and mail it to you. Because I know for a fact that Fireworks can open a JPEG. Then you can crop out the middle rectangle and easily reconstruct the background layer by filling in the area where the middle rectangle used to be with the dark background color. That will give you your 2 layers in Fireworks and you can then center the layers as required in the diagram in my first post. Then you can save it as a JPEG and mail it back to me. (Mailing is required, since if it's posted here, it will be resized smaller). I can then double check the centering with the PS ruler tool, which can register the 0.5.
 
Can you do the above scenario for the original JPEG above and post your result here? (It will post at the correct size, since it's small.) Thanks!
-----------------------------------------------------------------------------------
 
Thanks again, everyone, for your help.
 
Larry

 


new_MSFN_static_signature.jpg

 

" What we achieve inwardly will change outer reality."  Plutarch

 

 

 


#9
dencorso

dencorso

    Iuvat plus qui nihil obstat

  • Supervisor
  • 6,194 posts
  • Joined 07-April 07
  • OS:98SE
  • Country: Country Flag

Donator

@larryb123456: You're welcome! :yes:

 

BTW, in theory a "pixel" is the smallest unity of collor a pic (generically, no matter whether it's a drawing or an image). In this sense, the pixel should be "atomic" (i.e.: allowing no further division whatsoever). So, it makes sense that, just as you reported, photoshop resorts to a color dithering trick (suposedly causing the impression of a semi-pixel, at least in some contexts), because pixels are indivisible. That said, I always like to remind people that, although in theory there no difference between theory and practice, in practice there often is at least some difference between them, so that there may actually be programs that can work on fractional pixel levels, regardless.



#10
j7n

j7n

    Member

  • Member
  • PipPip
  • 295 posts
  • Joined 18-December 06
  • OS:XP Pro x86
  • Country: Country Flag
To get "subpixel" resolution the image must be resampled. There is no way around it. Some software may perform it automatically, but it still does it (and it's a pain if it can't be controlled). You will lose some precision, which may not be noticeable on smooth photographs or anti-aliased shapes or type (which themselves already have gone through the process of oversampling, and have fractional pixel resolution), but definitely will blur out sharp transitions like the pixel art "51", assuming it was part of the actual picture you're working on.

However, you could resample only the layer that needs to be moved, and leave other layer(s) untouched. Copy it out into a new document, upscale it by a factor of 2, move it, for example, by adding 1px in the Canvas Size dialog. Downscale it to 50%, move it back into the original document.

You might want to experiment with different resampling algorithms to balance sharpness and ringing. I know some versions of Photoshop have different Bicubic modes. You might even save the isolated layer as a PNG file with transparency and make use of another software product to resize it, should its result be more pleasing to the eye.

If the movable layer was ever in vector format (such as if it was distorted text), you could go back to it's source file, and move the coordinates of it's shapes by the amount required, and repeat any raster editing it has to have.

Edited by j7n, 21 January 2015 - 11:32 PM.


#11
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 10,089 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Do you even need to worry about the half pixels? Why not just make an image that is 2560x423? If it were me (and I'm not certain I care about people using Youtube on a TV), i'd use a gradient in my design to handle the space above and below the Max-Width sized banner.

 

Reference Guide:

https://support.goog...r/2972003?hl=en


MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#12
dencorso

dencorso

    Iuvat plus qui nihil obstat

  • Supervisor
  • 6,194 posts
  • Joined 07-April 07
  • OS:98SE
  • Country: Country Flag

Donator

In any case, using 509 pixels from above and from below would be a fair enough approximation, and one that is easy to implement, at that. :yes:



#13
larryb123456

larryb123456

    Confused but Happy

  • Member
  • PipPipPipPipPip
  • 797 posts
  • Joined 10-August 10
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Thanks, everyone, for your input.

 

@Tripredacus:

I wanted to try to make my YouTube channel cover art as they directed, if possible, rather than take matters into my own hands and come up with all kinds of other approximations.

Those approximations, really deviations, were to be as a last resort.

I take it that you were unable to exactly center my 51px tall red rectangle in the 200px tall gray square, as you said you could do in your post describing a positioning feature of Fireworks.

Is that correct?

Or maybe you didn't want to take the time, about 3 minutes or so, to do as I asked when I said:

"Can you do the above scenario for the original JPEG above and post your result here? (It will post at the correct size, since it's small.) Thanks!",

which is at the bottom of that post, in between the two dashed horizontal lines.

If at all possible, I'd like for you to do what you can, the best you can, and post the result so that I can see the capabilities of Fireworks, in case I ever run into this situation again and might want to purchase Fireworks.

But, of course, as you well know, you don't have to do it just because I asked you.

 

@dencorso: Thanks, again my friend! You always have a knack for getting down to the real nitty gritty. If I make the central rectangle in my YouTube channel cover art 2560x422px, instead of 2560x423 as they recommend, and center it 509px above and below as you suggest, then the non-TV YouTube channel watchers will see a 1/2 pixel dark border at the top and bottom of the central region on their devices. Am I correct in my thinking here? A little dark border at the top and bottom might even improve the graphic. If I have no other alternative, I'll employ your suggestion. Thanks again!


new_MSFN_static_signature.jpg

 

" What we achieve inwardly will change outer reality."  Plutarch

 

 

 


#14
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 10,089 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

There are various problems here. Youtube decided to make a specific image size, to be designed in 3 sections using a total number of pixels that would seem to be the correct amount because it can be divided by 3. It would make sense at first, but it doesn't because you run into this problem. I've run into this before while doing my own designs. The end result is I would design something and it wouldn't be exactly centered, as I was using a "block model" in my design. This can be due to failure to count borders.

 

So while Fireworks allows me to physically type in half pixels, it also doesn't actually allow it. It is possible to "fake" it, but it would require you to have a feathered border (of some degree) on the block edge to make it appear it was centered. If you look at the sample image on the official Youtube guide, you see this in action as well.

 

The other problem is that whoever made the guide you want to use has made an error. They are presuming that the middle section (for non-TV devices) is supposed to be centered. Simple math tells you that the total height (1440) minus non-TV viewable height (423) gives you 1017... divide that in half and you get the 508.5. This would then seem to mean that the "always viewable" segment of the banner should have a Y of 508.5.

 

Here is where their error is revealed. If you download the actual template from Youtube (I tested the Fireworks PNG) and take a look where that center block starts, it is Y509.

 

So, that guide you are using is wrong. We can argue that Youtube is wrong because they should have done some better testing, however we should know that most people aren't picky about doing things properly. So you make do with what Youtube gives you... Although considering this type of image, I wouldn't use a block design that pushes directly to that border.


  • larryb123456 likes this
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#15
larryb123456

larryb123456

    Confused but Happy

  • Member
  • PipPipPipPipPip
  • 797 posts
  • Joined 10-August 10
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

@Tripredacus:

 

Re: Here is where their error is revealed. If you download the actual template from Youtube (I tested the Fireworks PNG) and take a look where that center block starts, it is Y509.

 

Thanks so much, Trip, for that very informative bit of writing and your detective work. I know that took considerable time, and this definitely closes the book on this question. I did download the actual template for reference, but didn't actually measure where the center block started, as you did. I just took YouTube's word for the 508.5px. Great thinking! I really appreciate your effort!

 

What I've mostly learned from this exercise are two things:

 

#1 -- As former U.S. President Reagan said:

 

TRUST BUT VERIFY

 

#2 -- NEVER TRUST   THE MAN

 

Just to be safe, I'm gonna go with #2 from here on out!

 

Thanks again, Trip!

 

Larry


Edited by larryb123456, 22 January 2015 - 05:19 PM.

new_MSFN_static_signature.jpg

 

" What we achieve inwardly will change outer reality."  Plutarch

 

 

 


#16
dencorso

dencorso

    Iuvat plus qui nihil obstat

  • Supervisor
  • 6,194 posts
  • Joined 07-April 07
  • OS:98SE
  • Country: Country Flag

Donator

Well, Tripredacus has already nailed it, so the issue is solved. Even so, I'll answer your question all the same because mine was a "Galilean Experiment" (= an experiment conducted fully inside one's own imagination), because I don't have at hand neither Photoshop nor Fireworks. I thought that, at worst, my 509 pixels approximation might result in a half-pixel dark/black line/frame just as you envisaged, but it also occured to me that, at best, it might just work, without causing no such dark line, because of the integrating properties of the human eye (viz. the same reason why images made of pixels actually work). Now I do think, in view of Tripredacus finding that You Tube actually does use exactly the approximation I was suggesting, while talking about half-pixels, that the latter is probably the correct answer, even if it's the less intuitive one. So, in short, I think that no such dark line will be noticeable. But I'll wait for your actual experiments to confirm or disprove this.



#17
larryb123456

larryb123456

    Confused but Happy

  • Member
  • PipPipPipPipPip
  • 797 posts
  • Joined 10-August 10
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Thanks, dencorso:

 

With regard to your comment, " I'll answer your question all the same because mine was a "Galilean Experiment" (= an experiment conducted fully inside one's own imagination)":

It was a "Galilean Experiment" that led Einstein to his E=mc2, so it's clear you have an Einsteinian mind. I've been telling you for the last 4 1/2 years that you're the Little Brazilian Einstein. Perhaps now you'll believe me.

Since we're friends, may I call you LBE for short? Less wear and tear on my tongue. Thanks in advance.

 

I don't know if I'll be doing any more work on this project. The FIFA player, also from Brazil, who wanted me to do the work for him, basically gave me very, very little information and said make it for me. When I asked him to provide a bunch of images that he wanted to use and some more details, I haven't heard from him for 5 days. In my post to him, I told him that when I got all the information, then I'd proceed. Iffin I ain't a gonna get it, I ain't a gonna do it! Case closed!

 

My friend, LBE, can you Galileanify up about a million dollars for me, in a kind of an m=E/c2 frame of mind? Thanks in advance. Rest up, you're gonna need a lot of energy.

 

Larry


Edited by larryb123456, 22 January 2015 - 11:51 PM.

new_MSFN_static_signature.jpg

 

" What we achieve inwardly will change outer reality."  Plutarch

 

 

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users