Possible to resize *only* transparent pixels?

JH
Posted By
Jon_Humphreys
May 9, 2008
Views
1236
Replies
13
Status
Closed
I’m interested in doing a non-destructive "resize" of an image, whereby only the transparent pixels are traditionally resized and the non-transparent pixels remain the same size (but move relative to the resized transparent pixels).

As an example, imagine an image that consists of stars on a transparent background. If we were to do the above to this image, the physical space taken up by the image would increase (due to the resizing of the transparent pixels), but the stars themselves would remain the same size. In short, the stars would appear to spread out to fill more space.

If it helps, here’s an illustrated example:

< http://i284.photobucket.com/albums/ll35/jhumpty2424/explanat ion.jpg>

Does anyone know if this is possible in Photoshop?

Thanks.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

RK
Rob_Keijzer
May 9, 2008
Jon,

This isn’t going to work with plain pixels. Pixels in a document all have the same "size".

I think what you need are (smart) objects that have a colour attribute and a radius.

I never do that, but someone will jump in who knows more about vector objects.

Rob
EG
Ed_Grenzig
May 9, 2008
Jon
What you are describing is a simple crop of the image where you discard some of the pixels and keep the others intact. The remaining pixels have the same numerical value. The image scene is actually smaller after the crop.
Use the crop tool in PS but make sure the resolution input box is blank. (If the resolution box has a value in it you will be cropping and resampling at the same time. see below)

Resizing or resampling, as you state, is actually changing the pixels in an image through mathematics and keeping the entire scene the same. None of the pixels have the same value after you resample. You can up-sample or down-sample. Example: 1000 x 500 pixel image. Resample to 500 x 250 pixels but total scene in not changed. Less pixels but same image.

Ed
DM
Don_McCahill
May 9, 2008
In your stars example I would just extend the canvas with canvas size, and then lasso and move the stars. Perhaps this will also work in your real example.
JH
Jerry_Hoffmann
May 9, 2008
If your on a PC you could use ProCanvas and add the same amount of canvas on all four sides and you wouldn’t have to move the stars at all.
They would stay in the center of the canvas.
RK
Rob_Keijzer
May 9, 2008
Jerry,

The O/P was talking about stretching the canvas without resizing the objects, not about simply adding canvas to the sides.

Rob
DM
Don_McCahill
May 9, 2008
And you wouldn’t need ProCanvas, as you can add canvas within Photoshop (unless I am missing something).
JM
J_Maloney
May 9, 2008
I think the OP has no idea what he wants. 🙂

Will transparent pixels be added from the center? Proportionately across the image? What about areas of trans pixels trapped (or even bounded by) opaque pixels (like the center of an "o" or the space inside a star’s points)? I think the OP should go about doing this just as he did his sample…

J
JH
Jon_Humphreys
May 9, 2008
Thanks for your suggestions, everyone.

What I was hoping to find is essentially a "moving function" that would automatically expand all transparent pixels by a specified amount, in effect "moving" all non-transparent pixels and spreading them out over a larger area.

J Maloney: Perhaps my example wasn’t clear enough or was oversimplified. Here’s a more specific application of what I’m looking to do:

Let’s say we have a texture of some spots of rust on a metal plate. Something like this:

< http://i284.photobucket.com/albums/ll35/jhumpty2424/rust1.jp g>

We want to use the rust spots to add detail to some other image, so we separate them out as such:

< http://i284.photobucket.com/albums/ll35/jhumpty2424/rust2.jp g>

Now let’s say we like these rust spots, but we don’t want them to be so concentrated in such a tight cluster. Or perhaps we want to apply them evenly over a much larger image so that we have rust spots, but in a much lower density. A "less rusty" effect, for example.

A traditional option would be to resize the rust2.jpg image to make it bigger, thereby spreading out the rust spots. However, sizing up the rust2.jpg image (Image -> Image Size…) will upsample, introducing artifacts and making the rust spots more blurry. For high resolution texture creation for 3d objects that are going to be seen up close, this kind of blurriness wouldn’t be acceptable.

What I’d like to do is to spread out the rust spots over a larger area without actually changing the size (and therefore the blurriness) of the rust spots.

In effect, this would involve sizing up all the non-bounded transparent pixels while leaving the non-transparent pixels (and also the bounded transparent pixels) as-is.

As Don mentioned, this could be accomplished via brute force method by selecting and moving each rust spot by hand. However, when we’re talking about thousands of rust spots…well, that’s why we invented computers, right? 🙂

It seems to me that such a function would be quite useful for artists who are compositing several images to form custom textures – a common task when creating textures for things like static 3d models, games, film animation, etc – providing a heretofore unavailable level of control over texture detail. In the above rust example, the rust1 texture would be useless if we wanted a less dense rusty effect. We’d have to go get a less dense rusty texture, and we’d be bound by whatever rust density we could find in existing texture libraries or out in the field. But with a "moving" function, suddenly our texture libraries would become much more versatile.

I have no idea how the plugin API for Photoshop works, but perhaps something like this would be possible from a plugin standpoint?

Jon
C
Curvemeister
May 9, 2008
On Thu, 8 May 2008 20:27:14 -0700, wrote:

I’m interested in doing a non-destructive "resize" of an image, whereby only the transparent pixels are traditionally resized and the non-transparent pixels remain the same size (but move relative to the resized transparent pixels).

As an example, imagine an image that consists of stars on a transparent background. If we were to do the above to this image, the physical space taken up by the image would increase (due to the resizing of the transparent pixels), but the stars themselves would remain the same size. In short, the stars would appear to spread out to fill more space.
If it helps, here’s an illustrated example:

< http://i284.photobucket.com/albums/ll35/jhumpty2424/explanat ion.jpg>
Does anyone know if this is possible in Photoshop?

The process you are referring to is very similar to "seam carving" or "content-aware resizing" and was presented at last year’s SIGGRAPH.

Here is a link to a video, and a discussion of available software here: http://www.techcrunch.com/2007/08/27/i-want-this-in-photosho p-immediately/

Paper here:
http://www.scribd.com/doc/263453/Seam-carving-contentaware-i mage-resizing
Mike Russell – http://www.curvemeister.com
JH
Jon_Humphreys
May 9, 2008
Mike,

In my opinion, that is simply brilliant. It’s exactly the functionality I was looking for. Thank you so much for pointing this out.

If Adobe is watching these forums, I’d hazard to say this is the kind of technology that would make Photoshop worth the (oft-criticized) price tag. It would almost certainly add needed value and incentive to upgrade.

Jon
C
Curvemeister
May 10, 2008
On Fri, 9 May 2008 15:35:06 -0700, wrote:

Mike,

In my opinion, that is simply brilliant. It’s exactly the functionality I was looking for. Thank you so much for pointing this out.
If Adobe is watching these forums, I’d hazard to say this is the kind of technology that would make Photoshop worth the (oft-criticized) price tag. It would almost certainly add needed value and incentive to upgrade.

Jon

You’re more than welcome. The Genuine Fractals folks have purchased the technology. There is a free downloadable demo of a product called Liquid Color available at www.ononesoftware.com.

Mike Russell – http://www.curvemeister.com
JR
John_R_Nielsen
May 11, 2008
That is just too cool! You could use blends in Illustrator to consrtuct displacement maps for use in Photoshop to do the same thing, but this is so much more elegant, without having to shell out to another program.
JM
Jonas_M._Rogne
May 13, 2008
You should show us the exact document in question – if possible – so we can suggest possible solutions that apply to it.

Anyway, what you want to do is not to scale, but to move several objects further apart.

I would suggest keeping the objects on separate layers and then moving them individually, or as someone suggested; use the just select them and drag them around.

Another option is to do it using vector objects, maybe in illustrator, where you will be able to scale the entire group of objects by e.g. 200%, then use object>transform>transform each to reduce each individual object back to 50% (leaving it at original size).

Or if we’re talking just stars and minor up-scaling you could maybe use layer styles to fake it by adding a transparent inner "outline" (effectively shrinking the objects).

OK, final solution, use software that uses a new fancy resize technique like this: <http://www.ononesoftware.com/detail.php?prodLine_id=36> (free beta).
(mark the objects you want to retain and it will not touch them when scaling)

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections