In Photoshop, set your Units & Rulers Point/Pica settings to traditional. AI does not use the simplified PostScript math. If you will, it is over-precise, which of course makes sense - in a vector world, values do not necessarily have to adhere to a pixel grid like they need to in PS.
Adding to what Lutz said, you may change the values to integers in the Transform palette, with the image selected.
Thanks for the quick reply. Unfortunately, I tried what you suggested, and it made no difference to the behavior I'm seeing. I even restarted Photoshop after making the change to "Traditional" and started a new document.
Just to be clear, here are the steps I'm taking:
1. Use Alt+PrintScreen to screen-snap a window on my system.
2. In Photoshop, do New Document and use the Clipboard preset.
3. Paste the screen snap into my new Photoshop document.
4. Make a 16x16 pixel rectangular selection in Photoshop and copy it to the clipboard.
5. Go to an empty document in Illustrator.
6. Paste the bitmap into Illustrator. In the toolbar, it says: Image Embedded RGB PPI:72.009 W:15.998 H:15.998
7. Click the Image link in the toolbar, and go to the Link Information dialog. It says: Transform: Scale: 99.988%, 99.988%
8. Resize the bitmap to 16x16 pixels. PPI now changes to 72, and the Link Information dialog now says Scale: 100%, 100%.
I get the same result whether I set Photoshop's "Point/Pica Size" setting to PostScript (72) or to Traditional (72.27).
Since both Photoshop and Illustrator are set to 72 pixels per inch, why can't Illustrator get the size exactly right? I understand that I can manually resize the bitmap to 16x16 pixels, but that's annoying. These products are supposed to be part of an integrated suite; they should work better together than this.
What happens if you skip Photoshop and paste the screenshot into Illy?
And why go through Photoshop in the first place?
Occasionally, I paste screenshots into Illy, and I have never seen anything like your issue, but then again, I am still with 10.
If I paste the screenshot directly into Illustrator, it has the correct size, and PPI is 72, and the Link Information dialog shows Scale of 100%. I also get the correct behavior if I paste from other Windows apps, for example IrfanView. The messed-up size only seems to happen if I paste from Photoshop.
As I mentioned, the reason I go into Photoshop first is that I need to copy one or more specific PARTS of the screenshot, not the whole thing.
Please forgive the possible silliness of the question:
Why not just select the desired part in Illy, and either:
1) Create a Clipping Mask, preferably doing away with the outlying parts, with the masked image selected, by:
1a) Ticking anything but Normal in the Transparency dropdown list,
1b) Object>Flatten Transparency; you may keep the Raster/Vector balance at full vector,
2) Set the Crop Marks/Crop Area/Artboard/whatever, depending of version, before saving/exporting?
Damn, that was one silly question.
Even with Illustrator screwing up the bitmap size, it's still MUCH quicker to just select what I want in Photoshop and copy/paste it into Illustrator, than any of the alternatives provided by Illustrator. My understanding is that it's more efficient too, since Illustrator doesn't have to carry around the rest of the bitmap (the 99.99% I'm not interested in).
But please, let's not get sidetracked. I just want Illustrator to do the right thing when I paste a bitmap from Photoshop... since they are, after all, part of the same suite.
My understanding is that it's more efficient too, since Illustrator doesn't have to carry around the rest of the bitmap (the 99.99% I'm not interested in).
1a) and 1b) form a way to get rid of the 99.99%, with less effort than using two applications and correcting the size, I believe.
This is not written in defence of application shortcomings.
Of course I was just kidding on the silly part. I appreciate your help, really!
I'm not using two applications, I'm using one suite.
I didn't know that the Flatten Transparency trick would get rid of the excess parts of the bitmap. (I knew the clipping mask alone doesn't do it.) So I've already learned something new! But... it still seems much more intuitive to me to do bitmap stuff in Photoshop (including selecting parts of a bitmap) and vector stuff in Illustrator. I have both of them open anyway, when I'm doing this type of work.
Have you adjusted PS' "New Document" DPI to match your screen DPI? This could be another reason why PS may think it needs to do some magic. Also make sure to select at 100% zoom and no feathering is active somewhere. Since PS is sub-pixel precise, even the slightest offset would force it to take across those sub-pixels/ round them off, in turn resulting in a crooked value conversion in AI. Normal image viewers/converters do not care for sub-pixels, hence the problem doesn't occur.
I thought you might be on to something there... and it DID have an effect, but not the one we're hoping for.
I set my Photoshop DPI to my screen DPI of 96 and created a new document. I then went through the same routine, and now the pasted bitmap shows in Illustrator as PPI: 96.016. When I "fix" the width and height, the PPI changes to 96. (The width and height are also scaled by 0.75, which is what you'd expect.)
Interesting: The error amount, 0.016 is 1/6000 of 96. The error amount for 72 DPI was 0.009, which is 1/8000 of 72. Those are awfully round numbers. I wonder what this means...
So Illustrator is getting, via the clipboard, the source DPI from Photoshop -- even when it's different from Illustrator's DPI -- but it isn't getting the correct value. For some bizarre reason, it's getting adjusted a tiny bit. I'm willing to bet that if the DPI came in correctly from Photoshop, the bitmap width and height would be correct too.
It should. The one question we have overlooked so far: Is your AI target document actually 72/ 96 DPI? If not, AI would still do some fancy math, as all its calculations are based on point measures...
Is your AI target document actually 72/ 96 DPI?
If not, when set in points or pixels, someone else has overlooked something in creating the application/version.
So the question may be: Is your File>Document Setup Randomly set to something else? If so, try points/pixels.
And quick, before someone complains: it is PPI.
Let me make sure we're talking about the same thing: When I create my new AI document, in the New Document dialog, Units is set to "Pixels", and Raster Effects is set to "Screen (72 ppi)". These are the settings I always use.
Is there anywhere else that I need to set PPI to 72?
We are, Random. I was referring to the Document Setup unit (as it was called in 10); that should be sufficient.
So I believe that was just one thing less to try/rule out.