With pixels as you units, make a selection of the layer and look at the Info palette.
I believe your method shows the pixel size of the selection based on the overall pixel size of the canvas. This is the pixel size of the displayed layer on the screen. The actual pixel size of the layer image may be higher or lower, if it was resized but not resampled.
ie: when you copy in an image from another file the image layer first displays at the pixel size based on the current pixel canvas size. It displays at a one for one pixel size match. If you now resize your layer image it will display at a new size yet the pixels stored in that layer have not been changed (no resampling). Just the display has been changed. I want to know what the stored pixels are for that image layer. I can see the displayed size but not the actual stored pixel size.
When I said make a selection, I mean Ctrl-click on it in the Layers palette, not Ctrl-A (Select All). This will make a selection of the "object", and in the Info palette it will give you the pixel dimensions of the object, as if the layer were cropped to its bounds.
Is that what you want?
If you want the number of pixels look at the Histogram palette for that same selection.
I understand your solution and appreciate it. It works fine. Edit/Free transform (ctrl-T) also displays the pixel size of the image layer. But please comment on the following 1, 2 ,3.
1) I was under the impression that when you copy an image layer (example 1000 x 2000 pixels) into another image file the layer gets displayed at 1000 x 2000 pixels. When you now resize the image layer (in the new image file) using edit/free transform to say 500 x 1000 pixels, cs3 will display the image at 500 x 1000 pixels but keeps the 1000 x 2000 pixels internally for later use if necessary.
2) I now think this may not be true since as an example, I resized this 1000 x 2000 pixel image layer using edit/free transform to 50 x 100 pixels and then back to 1000 x 2000 pixels and the resultant layer image quality was very very poor. Cs3 must have first down-sampled the layer image and then up-sampled the layer image to end up displaying such a poor quality image. This seems to indicate that one must be very careful not to accidentally resize an image layer very small and then enlarge it once again!!
3) Is their any way to have cs3 keep the 1000 x 2000 pixels for later use?
3) Sure, make a copy of the layer before you re-size it.
Normally I would say no, the pixel information is lost, but there is a thing called Smart Objects. Since I don’t have CS3 I am not sure how they work but that might allow you to resize with9ut losing the pixel count.
Generally once you downsample you will not get back the same detail by upsampling.
Ditto what David said. Duplicate the layer first.
Actually it seems that as Ed suggests, converting to a Smart Object would do exactly what you are looking for. I’ve never really used Smart Objects myself but from the description in the help file (I have CS2) it seems that they do exactly what you want, effectively creating a link to the original, to quote from the help files:
‘When you want to modify the document (for example, scale it), Photoshop re-renders the composite data based on the source data.’
and
‘Smart Objects are useful because they allow you to do the following:
Perform nondestructive transforms. For instance, you can scale a layer as much as you want without losing original image data.’
Trust me…If you are free transforming, smart objects are the way to go…you can resize at will, add smart filters, re-edit layers, etc.
It seems that converting the image layer to a smart object works and will keep all the original pixels when free scaling the layer image by using Edit/Free transform ctrl-T. This way no pixel data is lost/added or resampled. If you select the image layer at any time, and then ctrl-T the info pallet will tell you the original size in percent %. You can also go back to the original size by ctrl-T and entering 100% for the H and W.
Thanks to everyone for all your help.